Commit 628892b35b16f6100be3bd4a9487dc18b947c3b1

Authored by Igor Kulikov
1 parent 92c4d00f

UI: Propagate key filters for entities hierarchy subscriptions. Fix Maps bounds.

... ... @@ -418,6 +418,7 @@ export class EntitiesHierarchyWidgetComponent extends PageComponent implements O
418 418 const childrenDatasource = {
419 419 dataKeys: datasource.dataKeys,
420 420 type: DatasourceType.entity,
  421 + filterId: datasource.filterId,
421 422 entityFilter
422 423 } as HierarchyNodeDatasource;
423 424 const subscriptionOptions: WidgetSubscriptionOptions = {
... ...
... ... @@ -219,8 +219,12 @@ export default abstract class LeafletMap {
219 219 }
220 220 } else {
221 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 230 if (this.options.useDefaultCenterPosition) {
... ...