mobility-toolbox-js 3.0.0-beta.5 → 3.0.0-beta.7
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.
- package/mbt.js +2 -48
- package/mbt.js.map +2 -2
- package/mbt.min.js +13 -13
- package/mbt.min.js.map +3 -3
- package/ol/layers/MapGlLayer.js +1 -1
- package/ol/layers/MaplibreStyleLayer.js +1 -1
- package/ol/mixins/PropertiesLayerMixin.js +0 -60
- package/package.json +1 -1
package/mbt.js
CHANGED
|
@@ -45449,20 +45449,6 @@ uniform ${i3} ${s3} u_${a3};
|
|
|
45449
45449
|
if (evt.key === "children") {
|
|
45450
45450
|
this.onChildrenChange(evt.oldValue);
|
|
45451
45451
|
}
|
|
45452
|
-
}),
|
|
45453
|
-
// Manage group visiblity
|
|
45454
|
-
this.on("change:visible", () => {
|
|
45455
|
-
this.onVisibleChange();
|
|
45456
|
-
}),
|
|
45457
|
-
// Listen for group visiblity change
|
|
45458
|
-
// if a layer from a group is newly visible we hide the others.
|
|
45459
|
-
// @ts-ignore
|
|
45460
|
-
this.on(`change:visible:group`, (evt) => {
|
|
45461
|
-
if (this.group === evt.target.group && this !== evt.target && this.visible) {
|
|
45462
|
-
this.visible = false;
|
|
45463
|
-
} else if (this.children) {
|
|
45464
|
-
this.children.forEach((child) => child.dispatchEvent(evt));
|
|
45465
|
-
}
|
|
45466
45452
|
})
|
|
45467
45453
|
);
|
|
45468
45454
|
this.options = options;
|
|
@@ -45548,38 +45534,6 @@ uniform ${i3} ${s3} u_${a3};
|
|
|
45548
45534
|
child.set("parent", this);
|
|
45549
45535
|
});
|
|
45550
45536
|
}
|
|
45551
|
-
/** @private */
|
|
45552
|
-
onVisibleChange() {
|
|
45553
|
-
const parent = this.get("parent");
|
|
45554
|
-
const children = this.get("children") || [];
|
|
45555
|
-
if (this.getVisible()) {
|
|
45556
|
-
const group = this.get("group");
|
|
45557
|
-
if (parent) {
|
|
45558
|
-
parent.setVisible(true);
|
|
45559
|
-
}
|
|
45560
|
-
if (children && !children.some((child) => child.getVisible())) {
|
|
45561
|
-
children.forEach((child) => {
|
|
45562
|
-
child.setVisible(true);
|
|
45563
|
-
});
|
|
45564
|
-
}
|
|
45565
|
-
if (parent && group) {
|
|
45566
|
-
let higherParent = parent;
|
|
45567
|
-
while (higherParent.get("parent")) {
|
|
45568
|
-
higherParent = higherParent.get("parent");
|
|
45569
|
-
}
|
|
45570
|
-
const evt = new Event_default(`change:visible:group`);
|
|
45571
|
-
evt.target = this;
|
|
45572
|
-
higherParent.dispatchEvent(evt);
|
|
45573
|
-
}
|
|
45574
|
-
} else {
|
|
45575
|
-
children.forEach((child) => {
|
|
45576
|
-
child.setVisible(false);
|
|
45577
|
-
});
|
|
45578
|
-
if (parent?.getVisible() && !parent?.get("children").find((child) => child.getVisible())) {
|
|
45579
|
-
parent.setVisible(false);
|
|
45580
|
-
}
|
|
45581
|
-
}
|
|
45582
|
-
}
|
|
45583
45537
|
/**
|
|
45584
45538
|
* Initialize the layer with the map passed in parameters.
|
|
45585
45539
|
*
|
|
@@ -45686,7 +45640,7 @@ uniform ${i3} ${s3} u_${a3};
|
|
|
45686
45640
|
const updateMbMapDebounced = (0, import_lodash.default)(this.updateMbMap.bind(this), 150);
|
|
45687
45641
|
this.olListenersKeys.push(
|
|
45688
45642
|
this.on("propertychange", (evt) => {
|
|
45689
|
-
if (/(apiKey|apiKeyName|url|style
|
|
45643
|
+
if (/(apiKey|apiKeyName|url|style)/.test(evt.key)) {
|
|
45690
45644
|
updateMbMapDebounced();
|
|
45691
45645
|
}
|
|
45692
45646
|
})
|
|
@@ -46109,7 +46063,7 @@ uniform ${i3} ${s3} u_${a3};
|
|
|
46109
46063
|
this.applyLayoutVisibility(evt);
|
|
46110
46064
|
}),
|
|
46111
46065
|
this.on("propertychange", (evt) => {
|
|
46112
|
-
if (/(sources|layers|layersFilter|maplibreLayer|beforeId
|
|
46066
|
+
if (/(sources|layers|layersFilter|maplibreLayer|beforeId)/.test(evt.key)) {
|
|
46113
46067
|
this.detachFromMap();
|
|
46114
46068
|
this.attachToMap(map);
|
|
46115
46069
|
}
|