mobility-toolbox-js 2.0.0-beta.43 → 2.0.0-beta.46
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/common/layers/Layer.d.ts.map +1 -1
- package/common/layers/Layer.js +3 -10
- package/mbt.js +3 -7
- package/mbt.js.map +2 -2
- package/mbt.min.js +1 -1
- package/mbt.min.js.map +2 -2
- package/ol/layers/MapboxLayer.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Layer.d.ts","sourceRoot":"","sources":["../../../src/common/layers/Layer.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;;;;;;;;;;;OAYG;IACH;QAT4B,GAAG;QACH,IAAI;QACF,UAAU;QACN,QAAQ;QACb,OAAO;QACP,QAAQ;QACT,YAAY;QACZ,UAAU;OA+BrC;IAvBC,iBAAuE;IAEvE,WAA0B;IAE1B,iCAAoC;IAEpC,8BAAgC;IAmBlC;;;;OAIG;IACH,
|
|
1
|
+
{"version":3,"file":"Layer.d.ts","sourceRoot":"","sources":["../../../src/common/layers/Layer.js"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;;;GAiBG;AACH;IACE;;;;;;;;;;;;OAYG;IACH;QAT4B,GAAG;QACH,IAAI;QACF,UAAU;QACN,QAAQ;QACb,OAAO;QACP,QAAQ;QACT,YAAY;QACZ,UAAU;OA+BrC;IAvBC,iBAAuE;IAEvE,WAA0B;IAE1B,iCAAoC;IAEpC,8BAAgC;IAmBlC;;;;OAIG;IACH,qCAyIC;IAED;;;;OAIG;IACH,4BAUC;IARC,cAAc;IACd,SAAc;IAShB;;OAEG;IAEH,sBAGC;IAED;;;;;;;OAOG;IAEH,qDAJW,MAAM,GACL,QAAQ,WAAW,CAAC,CAiB/B;IAED;;OAEG;IACH,cAEC;CACF"}
|
package/common/layers/Layer.js
CHANGED
|
@@ -70,7 +70,7 @@ export default class Layer extends BaseObject {
|
|
|
70
70
|
value: name,
|
|
71
71
|
},
|
|
72
72
|
key: {
|
|
73
|
-
value: key || uid,
|
|
73
|
+
value: key || name || uid,
|
|
74
74
|
},
|
|
75
75
|
group: {
|
|
76
76
|
get: () => this.get('group'),
|
|
@@ -107,16 +107,9 @@ export default class Layer extends BaseObject {
|
|
|
107
107
|
if (this.parent) {
|
|
108
108
|
this.parent.visible = true;
|
|
109
109
|
}
|
|
110
|
-
// If children
|
|
111
|
-
if (this.children && this.children.some((child) => !!child.group)) {
|
|
112
|
-
const child = [...this.children]
|
|
113
|
-
.reverse()
|
|
114
|
-
.find((childd) => !!childd.group);
|
|
115
|
-
child.visible = true;
|
|
116
|
-
}
|
|
117
|
-
// If children doesn't contain any visible layers (not using group), we display all children (not using group).
|
|
110
|
+
// If children doesn't contain any visible layers, we display all children.
|
|
118
111
|
if (this.children &&
|
|
119
|
-
!this.children.some((child) =>
|
|
112
|
+
!this.children.some((child) => child.visible)) {
|
|
120
113
|
this.children.forEach((child) => {
|
|
121
114
|
// eslint-disable-next-line no-param-reassign
|
|
122
115
|
child.visible = true;
|
package/mbt.js
CHANGED
|
@@ -47816,7 +47816,7 @@ uniform ${i3} ${o3} u_${a3};
|
|
|
47816
47816
|
value: name
|
|
47817
47817
|
},
|
|
47818
47818
|
key: {
|
|
47819
|
-
value: key || uid
|
|
47819
|
+
value: key || name || uid
|
|
47820
47820
|
},
|
|
47821
47821
|
group: {
|
|
47822
47822
|
get: () => this.get("group"),
|
|
@@ -47848,11 +47848,7 @@ uniform ${i3} ${o3} u_${a3};
|
|
|
47848
47848
|
if (this.parent) {
|
|
47849
47849
|
this.parent.visible = true;
|
|
47850
47850
|
}
|
|
47851
|
-
if (this.children && this.children.some((child) =>
|
|
47852
|
-
const child = [...this.children].reverse().find((childd) => !!childd.group);
|
|
47853
|
-
child.visible = true;
|
|
47854
|
-
}
|
|
47855
|
-
if (this.children && !this.children.some((child) => !child.group && child.visible)) {
|
|
47851
|
+
if (this.children && !this.children.some((child) => child.visible)) {
|
|
47856
47852
|
this.children.forEach((child) => {
|
|
47857
47853
|
child.visible = true;
|
|
47858
47854
|
});
|
|
@@ -48821,7 +48817,7 @@ uniform ${i3} ${o3} u_${a3};
|
|
|
48821
48817
|
var MapboxLayer = class extends MapboxLayerMixin_default(Layer_default4) {
|
|
48822
48818
|
attachToMap(map) {
|
|
48823
48819
|
super.attachToMap(map);
|
|
48824
|
-
if (!this.map
|
|
48820
|
+
if (!this.map) {
|
|
48825
48821
|
return;
|
|
48826
48822
|
}
|
|
48827
48823
|
this.olListenersKeys.push(this.map.on("change:size", () => {
|