mobility-toolbox-js 2.0.0-beta.63 → 2.0.0-beta.65

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
@@ -48092,28 +48092,12 @@ uniform ${i3} ${o3} u_${a3};
48092
48092
  var Layer3 = class extends UserInteractionsLayerMixin_default(Layer2) {
48093
48093
  constructor(options) {
48094
48094
  super(options);
48095
- if (this.olLayer) {
48096
- this.olLayer.setVisible(this.visible);
48097
- }
48095
+ this.olLayer?.setVisible(this.visible);
48098
48096
  }
48099
48097
  defineProperties(options) {
48100
48098
  super.defineProperties(options);
48101
- let currOlLayer = options.olLayer;
48102
48099
  Object.defineProperties(this, {
48103
- olLayer: {
48104
- get: () => {
48105
- return currOlLayer;
48106
- },
48107
- set: (newOlLayer) => {
48108
- if (currOlLayer === newOlLayer) {
48109
- return;
48110
- }
48111
- currOlLayer = newOlLayer;
48112
- if (currOlLayer) {
48113
- currOlLayer.setVisible(this.visible);
48114
- }
48115
- }
48116
- },
48100
+ olLayer: { value: options.olLayer, writable: true },
48117
48101
  olListenersKeys: {
48118
48102
  value: []
48119
48103
  }
@@ -48124,6 +48108,7 @@ uniform ${i3} ${o3} u_${a3};
48124
48108
  if (!this.map) {
48125
48109
  return;
48126
48110
  }
48111
+ this.olLayer?.setVisible(this.visible);
48127
48112
  if (this.olLayer && !this.map?.getLayers()?.getArray()?.includes(this.olLayer)) {
48128
48113
  this.map.addLayer(this.olLayer);
48129
48114
  }