mobility-toolbox-js 3.0.0-beta.3 → 3.0.0-beta.4

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 CHANGED
@@ -46086,8 +46086,7 @@ uniform ${i3} ${s3} u_${a3};
46086
46086
  if (!this.map || !this.maplibreLayer) {
46087
46087
  return;
46088
46088
  }
46089
- const { maplibreMap } = this.maplibreLayer;
46090
- if (!maplibreMap) {
46089
+ if (!this.map.getTargetElement()) {
46091
46090
  this.olListenersKeys.push(
46092
46091
  this.map.on("change:target", () => {
46093
46092
  this.attachToMap(map2);
@@ -46095,10 +46094,13 @@ uniform ${i3} ${s3} u_${a3};
46095
46094
  );
46096
46095
  return;
46097
46096
  }
46098
- if (maplibreMap.loaded()) {
46099
- this.onLoad();
46100
- } else {
46101
- maplibreMap.once("load", this.onLoad);
46097
+ const { maplibreMap } = this.maplibreLayer;
46098
+ if (maplibreMap) {
46099
+ if (maplibreMap.loaded()) {
46100
+ this.onLoad();
46101
+ } else {
46102
+ maplibreMap.once("load", this.onLoad);
46103
+ }
46102
46104
  }
46103
46105
  this.olListenersKeys.push(
46104
46106
  // @ts-expect-error 'load' is a custom event form mobility-toolbox-js