mirror of
				https://github.com/zadam/trilium.git
				synced 2025-11-04 04:16:17 +01:00 
			
		
		
		
	refactor(views/geo): use a different attribute
This commit is contained in:
		@@ -116,7 +116,7 @@ export const bookPropertiesConfig: Record<ViewTypeOptions, BookConfig> = {
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
                label: t("book_properties_config.map-style"),
 | 
					                label: t("book_properties_config.map-style"),
 | 
				
			||||||
                type: "combobox",
 | 
					                type: "combobox",
 | 
				
			||||||
                bindToLabel: "mapStyle",
 | 
					                bindToLabel: "map:style",
 | 
				
			||||||
                defaultValue: DEFAULT_MAP_LAYER_NAME,
 | 
					                defaultValue: DEFAULT_MAP_LAYER_NAME,
 | 
				
			||||||
                options: [
 | 
					                options: [
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -146,7 +146,7 @@ export default class GeoView extends ViewMode<MapData> {
 | 
				
			|||||||
            worldCopyJump: true
 | 
					            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;
 | 
					        let layer: Layer;
 | 
				
			||||||
        const layerData = MAP_LAYERS[layerName];
 | 
					        const layerData = MAP_LAYERS[layerName];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -295,7 +295,7 @@ export default class GeoView extends ViewMode<MapData> {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // Full reload if map layer is changed.
 | 
					        // 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;
 | 
					            return true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user