tg-map-vue3 3.7.6 → 3.7.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.
@@ -206,6 +206,7 @@ declare const TgMarker: import("vue").DefineComponent<{
206
206
  } & import("vue").ComponentCustomProperties & {}) | undefined;
207
207
  info: TgInfo | undefined;
208
208
  emittedPosition: LatLng | undefined;
209
+ autoAddToClustererWhenCreate: boolean;
209
210
  }, unknown, {}, {
210
211
  $clusterer(): TgMarkerClusterer | undefined;
211
212
  onAddLabel(label: TgLabel): void;
package/dist/tg-map.js CHANGED
@@ -5517,7 +5517,8 @@ const ms = /* @__PURE__ */ K(ps, [["render", gs]]), fs = w({
5517
5517
  marker: void 0,
5518
5518
  label: nt(),
5519
5519
  info: nt(),
5520
- emittedPosition: void 0
5520
+ emittedPosition: void 0,
5521
+ autoAddToClustererWhenCreate: i.autoAddToClusterer
5521
5522
  };
5522
5523
  },
5523
5524
  watch: {
@@ -5561,12 +5562,12 @@ const ms = /* @__PURE__ */ K(ps, [["render", gs]]), fs = w({
5561
5562
  }
5562
5563
  },
5563
5564
  onCreate() {
5564
- this.marker = this.$map.createMarker(this), this.label && this.marker.setLabel(this.label.overlay), this.$clusterer() && this.autoAddToClusterer ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.info && this.info.show && this.info.overlay.open(this.marker), Y(this.attrs.listeners, this.marker), "update:position" in this.attrs.listenerProps && this.marker.addEventListener("dragend", (i) => {
5565
+ this.marker = this.$map.createMarker(this), this.label && this.marker.setLabel(this.label.overlay), this.$clusterer() && this.autoAddToClusterer ? this.$clusterer().onAddMarker(this.marker) : this.$map.addOverlay(this.marker), this.autoAddToClustererWhenCreate = this.autoAddToClusterer, this.info && this.info.show && this.info.overlay.open(this.marker), Y(this.attrs.listeners, this.marker), "update:position" in this.attrs.listenerProps && this.marker.addEventListener("dragend", (i) => {
5565
5566
  this.$emit("update:position", this.emittedPosition = i.position);
5566
5567
  });
5567
5568
  },
5568
5569
  onDestroy() {
5569
- this.$clusterer() && this.autoAddToClusterer ? this.$clusterer().onRemoveMarker(this.marker) : this.$map.removeOverlay(this.marker);
5570
+ this.$clusterer() && this.autoAddToClustererWhenCreate ? this.$clusterer().onRemoveMarker(this.marker) : this.$map.removeOverlay(this.marker);
5570
5571
  },
5571
5572
  methods: {
5572
5573
  $clusterer() {