mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
refactor(views/geo): use a different attribute
This commit is contained in:
parent
aeb356bf54
commit
4f99db0c90
@ -116,7 +116,7 @@ export const bookPropertiesConfig: Record<ViewTypeOptions, BookConfig> = {
|
||||
{
|
||||
label: t("book_properties_config.map-style"),
|
||||
type: "combobox",
|
||||
bindToLabel: "mapStyle",
|
||||
bindToLabel: "map:style",
|
||||
defaultValue: DEFAULT_MAP_LAYER_NAME,
|
||||
options: [
|
||||
{
|
||||
|
@ -146,7 +146,7 @@ export default class GeoView extends ViewMode<MapData> {
|
||||
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<MapData> {
|
||||
}
|
||||
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user