From 4f99db0c9044db20e4a34ac73383d71be0e7dd88 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Thu, 24 Jul 2025 22:18:30 +0300 Subject: [PATCH] refactor(views/geo): use a different attribute --- .../src/widgets/ribbon_widgets/book_properties_config.ts | 2 +- apps/client/src/widgets/view_widgets/geo_view/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/client/src/widgets/ribbon_widgets/book_properties_config.ts b/apps/client/src/widgets/ribbon_widgets/book_properties_config.ts index 3b76246d5..09acb6e99 100644 --- a/apps/client/src/widgets/ribbon_widgets/book_properties_config.ts +++ b/apps/client/src/widgets/ribbon_widgets/book_properties_config.ts @@ -116,7 +116,7 @@ export const bookPropertiesConfig: Record = { { label: t("book_properties_config.map-style"), type: "combobox", - bindToLabel: "mapStyle", + bindToLabel: "map:style", defaultValue: DEFAULT_MAP_LAYER_NAME, options: [ { diff --git a/apps/client/src/widgets/view_widgets/geo_view/index.ts b/apps/client/src/widgets/view_widgets/geo_view/index.ts index 170b67b20..2810fa5bc 100644 --- a/apps/client/src/widgets/view_widgets/geo_view/index.ts +++ b/apps/client/src/widgets/view_widgets/geo_view/index.ts @@ -146,7 +146,7 @@ export default class GeoView extends ViewMode { worldCopyJump: true }); - const layerName = this.parentNote.getLabelValue("mapStyle") ?? DEFAULT_MAP_LAYER_NAME; + const layerName = this.parentNote.getLabelValue("map:style") ?? DEFAULT_MAP_LAYER_NAME; let layer: Layer; const layerData = MAP_LAYERS[layerName]; @@ -295,7 +295,7 @@ export default class GeoView extends ViewMode { } // Full reload if map layer is changed. - if (loadResults.getAttributeRows().some(attr => ((attr.name === "mapStyle") || (attr.name === "map:scale") && attributes.isAffecting(attr, this.parentNote)))) { + if (loadResults.getAttributeRows().some(attr => (attr.name?.startsWith("map:") && attributes.isAffecting(attr, this.parentNote)))) { return true; } }