mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 06:45:49 +01:00
chore(react/collections/geomap): restore state
This commit is contained in:
@@ -72,8 +72,6 @@ export default class GeoView extends ViewMode<MapData> {
|
||||
throw new Error(t("geo-map.unable-to-load-map"));
|
||||
}
|
||||
|
||||
this.#restoreViewportAndZoom();
|
||||
|
||||
const isEditable = !this.isReadOnly;
|
||||
map.on("click", (e) => this.#onMapClicked(e))
|
||||
map.on("contextmenu", (e) => openMapContextMenu(this.parentNote.noteId, e, isEditable));
|
||||
@@ -95,34 +93,6 @@ export default class GeoView extends ViewMode<MapData> {
|
||||
}
|
||||
}
|
||||
|
||||
async #restoreViewportAndZoom() {
|
||||
const map = this.map;
|
||||
if (!map) {
|
||||
return;
|
||||
}
|
||||
|
||||
const parsedContent = await this.viewStorage.restore();
|
||||
|
||||
// Restore viewport position & zoom
|
||||
const center = parsedContent?.view?.center ?? DEFAULT_COORDINATES;
|
||||
const zoom = parsedContent?.view?.zoom ?? DEFAULT_ZOOM;
|
||||
}
|
||||
|
||||
private onSave() {
|
||||
const map = this.map;
|
||||
let data: MapData = {};
|
||||
if (map) {
|
||||
data = {
|
||||
view: {
|
||||
center: ,
|
||||
zoom:
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
async #reloadMarkers() {
|
||||
if (!this.map) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user