Commit 628892b35b16f6100be3bd4a9487dc18b947c3b1
1 parent
92c4d00f
UI: Propagate key filters for entities hierarchy subscriptions. Fix Maps bounds.
Showing
2 changed files
with
7 additions
and
2 deletions
@@ -418,6 +418,7 @@ export class EntitiesHierarchyWidgetComponent extends PageComponent implements O | @@ -418,6 +418,7 @@ export class EntitiesHierarchyWidgetComponent extends PageComponent implements O | ||
418 | const childrenDatasource = { | 418 | const childrenDatasource = { |
419 | dataKeys: datasource.dataKeys, | 419 | dataKeys: datasource.dataKeys, |
420 | type: DatasourceType.entity, | 420 | type: DatasourceType.entity, |
421 | + filterId: datasource.filterId, | ||
421 | entityFilter | 422 | entityFilter |
422 | } as HierarchyNodeDatasource; | 423 | } as HierarchyNodeDatasource; |
423 | const subscriptionOptions: WidgetSubscriptionOptions = { | 424 | const subscriptionOptions: WidgetSubscriptionOptions = { |
@@ -219,8 +219,12 @@ export default abstract class LeafletMap { | @@ -219,8 +219,12 @@ export default abstract class LeafletMap { | ||
219 | } | 219 | } |
220 | } else { | 220 | } else { |
221 | this.map.once('zoomend', () => { | 221 | this.map.once('zoomend', () => { |
222 | - if (!this.options.defaultZoomLevel && this.map.getZoom() > this.options.minZoomLevel) { | ||
223 | - this.map.setZoom(this.options.minZoomLevel, { animate: false }); | 222 | + let minZoom = this.options.minZoomLevel; |
223 | + if (this.options.defaultZoomLevel) { | ||
224 | + minZoom = Math.min(minZoom, this.options.defaultZoomLevel); | ||
225 | + } | ||
226 | + if (this.map.getZoom() > minZoom) { | ||
227 | + this.map.setZoom(minZoom, { animate: false }); | ||
224 | } | 228 | } |
225 | }); | 229 | }); |
226 | if (this.options.useDefaultCenterPosition) { | 230 | if (this.options.useDefaultCenterPosition) { |