@geogirafe/lib-geoportal 1.0.2263324423 → 1.1.0-dev.2273129895
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -19,7 +19,7 @@ declare class TreeViewItemComponent extends TreeViewElement {
|
|
|
19
19
|
createOpacityTooltip(): void;
|
|
20
20
|
createFilterTooltip(): void;
|
|
21
21
|
registerEvents(): void;
|
|
22
|
-
|
|
22
|
+
refreshLegendsAndStyle(): void;
|
|
23
23
|
toggle(state?: 'on' | 'off'): void;
|
|
24
24
|
zoomToVisibleResolution(): void;
|
|
25
25
|
isVisibleInCurrentResolution(): boolean;
|
|
@@ -128,11 +128,11 @@ header{border-top:1px solid #ddd;align-items:center;height:2rem;display:flex}.to
|
|
|
128
128
|
}
|
|
129
129
|
registerEvents() {
|
|
130
130
|
this.subscribe(/layers\..*\.isLegendExpanded/, (_oldValue, _newValue, layer) => {
|
|
131
|
-
this.
|
|
131
|
+
this.refreshLegendsAndStyle();
|
|
132
132
|
this.refreshRender(layer);
|
|
133
133
|
});
|
|
134
134
|
this.subscribe(/layers\.layersList\..*\.activeState/, (_oldValue, _newValue, layer) => {
|
|
135
|
-
this.
|
|
135
|
+
this.refreshLegendsAndStyle();
|
|
136
136
|
this.refreshRender(layer);
|
|
137
137
|
});
|
|
138
138
|
this.subscribe(/layers\.layersList\..*\.hasError/, (_oldValue, _newValue, layer) => this.refreshRender(layer));
|
|
@@ -146,11 +146,23 @@ header{border-top:1px solid #ddd;align-items:center;height:2rem;display:flex}.to
|
|
|
146
146
|
this.subscribe(/layers\.layersList\..*\.opacity/, (_oldValue, _newValue, layer) => this.refreshRender(layer));
|
|
147
147
|
this.subscribe(/layers\.layersList\..*\.swiped/, (_oldValue, _newValue, layer) => this.refreshRender(layer));
|
|
148
148
|
this.subscribe('treeview.advanced', () => this.refreshRender(this.layer));
|
|
149
|
-
this.subscribe('position', () => this.
|
|
149
|
+
this.subscribe('position', () => this.refreshLegendsAndStyle());
|
|
150
150
|
}
|
|
151
|
-
|
|
152
|
-
if (this.layer
|
|
151
|
+
refreshLegendsAndStyle() {
|
|
152
|
+
if (!this.layer.parent.isExpanded) {
|
|
153
|
+
// Not visible, nothing to refresh
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
let refresh = false;
|
|
157
|
+
if (this.layer instanceof LayerWms && this.layer.legend && this.layer.isLegendExpanded) {
|
|
153
158
|
this.setWmsLegend();
|
|
159
|
+
refresh = true;
|
|
160
|
+
}
|
|
161
|
+
if ((this.layer instanceof LayerWms || this.layer instanceof LayerWmts) && this.layer.hasRestrictedResolution()) {
|
|
162
|
+
// Restricted resolution, maybe the layername should be written italic
|
|
163
|
+
refresh = true;
|
|
164
|
+
}
|
|
165
|
+
if (refresh) {
|
|
154
166
|
super.refreshRender();
|
|
155
167
|
}
|
|
156
168
|
}
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.
|
|
1
|
+
{"version":"1.1.0-dev.2273129895", "build":"2273129895", "date":"20/01/2026"}
|