@idmwx/idmui-gl4 0.8.9 → 0.9.1

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/dist/index.js CHANGED
@@ -379,7 +379,7 @@ const si = {
379
379
  zone: {
380
380
  handler() {
381
381
  var t, e, o, i, a, r;
382
- this.zone ? (this.handleRender(), (t = this.map) == null || t.on("click", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleClick), (e = this.map) == null || e.on("mouseenter", [this.pointLayer], this.handleHover), (o = this.map) == null || o.on("mouseleave", [this.pointLayer], this.handleLeave)) : (this.handleClear(), (i = this.map) == null || i.off("click", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleClick), (a = this.map) == null || a.off("mouseenter", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleHover), (r = this.map) == null || r.off("mouseleave", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleLeave));
382
+ this.zone ? (this.handleRender(), (t = this.map) == null || t.on("click", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleClick), (e = this.map) == null || e.on("mousemove", [this.pointLayer], this.handleHover), (o = this.map) == null || o.on("mouseleave", [this.pointLayer], this.handleLeave)) : (this.handleClear(), (i = this.map) == null || i.off("click", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleClick), (a = this.map) == null || a.off("mousemove", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleHover), (r = this.map) == null || r.off("mouseleave", [this.polygonLabelLayer, this.lineLabelLayer, this.pointLayer], this.handleLeave));
383
383
  },
384
384
  immediate: !0
385
385
  }
@@ -575,7 +575,7 @@ const hi = {
575
575
  port: {
576
576
  handler() {
577
577
  var t, e, o, i, a, r;
578
- this.port ? (this.handleRender(), (t = this.map) == null || t.on("click", [this.layer], this.handleClick), (e = this.map) == null || e.on("mouseenter", [this.layer], this.handleHover), (o = this.map) == null || o.on("mouseleave", [this.layer], this.handleLeave)) : (this.handleClear(), (i = this.map) == null || i.off("click", [this.layer], this.handleClick), (a = this.map) == null || a.off("mouseenter", [this.layer], this.handleHover), (r = this.map) == null || r.off("mouseleave", [this.layer], this.handleLeave));
578
+ this.port ? (this.handleRender(), (t = this.map) == null || t.on("click", [this.layer], this.handleClick), (e = this.map) == null || e.on("mousemove", [this.layer], this.handleHover), (o = this.map) == null || o.on("mouseleave", [this.layer], this.handleLeave)) : (this.handleClear(), (i = this.map) == null || i.off("click", [this.layer], this.handleClick), (a = this.map) == null || a.off("mousemove", [this.layer], this.handleHover), (r = this.map) == null || r.off("mouseleave", [this.layer], this.handleLeave));
579
579
  },
580
580
  immediate: !0
581
581
  }
@@ -710,7 +710,7 @@ function yi(t, e, o, i, a, r) {
710
710
  [Ge, a.showInfo]
711
711
  ]);
712
712
  }
713
- const bi = /* @__PURE__ */ Z(hi, [["render", yi], ["__scopeId", "data-v-9199bd8e"]]), wi = {
713
+ const bi = /* @__PURE__ */ Z(hi, [["render", yi], ["__scopeId", "data-v-6139e809"]]), wi = {
714
714
  name: "IdmLoadLine",
715
715
  props: {
716
716
  map: {
@@ -1362,7 +1362,7 @@ const Wi = {
1362
1362
  show: {
1363
1363
  handler() {
1364
1364
  var t, e, o, i, a, r;
1365
- this.show ? (this.handleRender(), (t = this.map) == null || t.on("click", [this.layer], this.handleClick), (e = this.map) == null || e.on("mouseenter", [this.layer], this.handleHover), (o = this.map) == null || o.on("mouseleave", [this.layer], this.handleLeave)) : (this.handleClear(), (i = this.map) == null || i.off("click", [this.layer], this.handleClick), (a = this.map) == null || a.off("mouseenter", [this.layer], this.handleHover), (r = this.map) == null || r.off("mouseleave", [this.layer], this.handleLeave));
1365
+ this.show ? (this.handleRender(), (t = this.map) == null || t.on("click", [this.layer], this.handleClick), (e = this.map) == null || e.on("mousemove", [this.layer], this.handleHover), (o = this.map) == null || o.on("mouseleave", [this.layer], this.handleLeave)) : (this.handleClear(), (i = this.map) == null || i.off("click", [this.layer], this.handleClick), (a = this.map) == null || a.off("mousemove", [this.layer], this.handleHover), (r = this.map) == null || r.off("mouseleave", [this.layer], this.handleLeave));
1366
1366
  },
1367
1367
  immediate: !0
1368
1368
  },
@@ -1447,7 +1447,7 @@ function qi(t, e, o, i, a, r) {
1447
1447
  [Ge, a.showInfo]
1448
1448
  ]);
1449
1449
  }
1450
- const Ki = /* @__PURE__ */ Z(Wi, [["render", qi], ["__scopeId", "data-v-851cf973"]]), Qi = {
1450
+ const Ki = /* @__PURE__ */ Z(Wi, [["render", qi], ["__scopeId", "data-v-a1d66213"]]), Qi = {
1451
1451
  name: "IdmIceAreas",
1452
1452
  props: {
1453
1453
  map: {
@@ -5067,13 +5067,13 @@ const wl = {
5067
5067
  },
5068
5068
  isLogin: {
5069
5069
  handler(t) {
5070
- t ? (this.fetchModels(), this.fetchWeatherLayers()) : this.models = {};
5070
+ t ? this.fetchModels() : this.models = {};
5071
5071
  },
5072
5072
  immediate: !0
5073
5073
  }
5074
5074
  },
5075
5075
  mounted() {
5076
- this.fetchCache(), this.fetchModels(), this.fetchWeatherLayers();
5076
+ this.fetchCache(), this.fetchWeatherLayers();
5077
5077
  },
5078
5078
  methods: {
5079
5079
  arraysEqual(t, e) {
@@ -8226,7 +8226,7 @@ const Cs = {
8226
8226
  },
8227
8227
  toggle: {
8228
8228
  handler() {
8229
- this.handleBind();
8229
+ this.showForm = !!this.toggle, this.handleBind();
8230
8230
  },
8231
8231
  immediate: !0
8232
8232
  },
@@ -8258,7 +8258,7 @@ const Cs = {
8258
8258
  },
8259
8259
  methods: {
8260
8260
  handleMenuToggle() {
8261
- this.isLogin ? (this.toggle = !this.toggle, this.showForm = !!this.toggle) : this.$emit("login");
8261
+ this.isLogin ? this.toggle = !this.toggle : this.$emit("login");
8262
8262
  },
8263
8263
  submitForm() {
8264
8264
  this.$refs.spotForm.validate().then(async (t) => {
@@ -8337,21 +8337,23 @@ const Cs = {
8337
8337
  this.toggle ? ((t = this.map) == null || t.on("click", this.handleClick), this.map.getCanvas().style.cursor = "pointer") : ((e = this.map) == null || e.off("click", this.handleClick), this.handleCloseMeteo());
8338
8338
  },
8339
8339
  handleClick(t) {
8340
- var o;
8341
- if (t.originalEvent.stopPropagation(), t.originalEvent.target.className === "mapboxgl-canvas") {
8342
- const i = t.lngLat;
8343
- if (this.form.latDegree = Number(oe.lat2pretty(i.lat).degree), this.form.latMinute = Number(oe.lat2pretty(i.lat).minute), this.form.latDirection = oe.lat2pretty(i.lat).direction, this.form.lngDegree = Number(oe.lng2pretty(i.lng).degree), this.form.lngMinute = Number(oe.lng2pretty(i.lng).minute), this.form.lngDirection = oe.lng2pretty(i.lng).direction, this.point = {
8344
- lat: i.lat,
8345
- lng: i.lng
8346
- }, this.positionMarker)
8347
- (o = this.positionMarker) == null || o.setLngLat([this.point.lng, this.point.lat]);
8348
- else {
8349
- const a = document.createElement("div");
8350
- a.innerHTML = '<svg t="1755510770354" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5552" width="200" height="200"><path d="M511.960615 827.234462s330.358154-215.906462 330.358154-465.526154C842.318769 183.650462 694.468923 39.384615 512 39.384615S181.563077 183.689846 181.563077 361.668923c0 249.659077 330.397538 465.565538 330.397538 465.565539z" fill="#FF8C00" p-id="5553"></path><path d="M511.921231 496.836923a127.054769 127.054769 0 1 0 0-254.148923 127.054769 127.054769 0 0 0 0 254.148923z" fill="#FFFFFF" p-id="5554"></path><path d="M354.461538 945.230769a157.538462 39.384615 0 1 0 315.076924 0 157.538462 39.384615 0 1 0-315.076924 0Z" fill="#494C4F" opacity=".4" p-id="5555"></path></svg>', a.firstChild.style.height = "28px", a.firstChild.style.width = "28px", this.positionMarker = new we.Marker(a).setLngLat([this.point.lng, this.point.lat]).setOffset([0, -14]).addTo(this.map);
8351
- }
8352
- } else
8340
+ if (t.originalEvent.stopPropagation(), t.originalEvent.target.className === "mapboxgl-canvas")
8341
+ this.handleDrawMarker(t.lngLat);
8342
+ else
8353
8343
  return !1;
8354
8344
  },
8345
+ handleDrawMarker(t) {
8346
+ var e;
8347
+ if (this.form.latDegree = Number(oe.lat2pretty(t.lat).degree), this.form.latMinute = Number(oe.lat2pretty(t.lat).minute), this.form.latDirection = oe.lat2pretty(t.lat).direction, this.form.lngDegree = Number(oe.lng2pretty(t.lng).degree), this.form.lngMinute = Number(oe.lng2pretty(t.lng).minute), this.form.lngDirection = oe.lng2pretty(t.lng).direction, this.point = {
8348
+ lat: t.lat,
8349
+ lng: t.lng
8350
+ }, this.positionMarker)
8351
+ (e = this.positionMarker) == null || e.setLngLat([this.point.lng, this.point.lat]);
8352
+ else {
8353
+ const o = document.createElement("div");
8354
+ o.innerHTML = '<svg t="1755510770354" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5552" width="200" height="200"><path d="M511.960615 827.234462s330.358154-215.906462 330.358154-465.526154C842.318769 183.650462 694.468923 39.384615 512 39.384615S181.563077 183.689846 181.563077 361.668923c0 249.659077 330.397538 465.565538 330.397538 465.565539z" fill="#FF8C00" p-id="5553"></path><path d="M511.921231 496.836923a127.054769 127.054769 0 1 0 0-254.148923 127.054769 127.054769 0 0 0 0 254.148923z" fill="#FFFFFF" p-id="5554"></path><path d="M354.461538 945.230769a157.538462 39.384615 0 1 0 315.076924 0 157.538462 39.384615 0 1 0-315.076924 0Z" fill="#494C4F" opacity=".4" p-id="5555"></path></svg>', o.firstChild.style.height = "28px", o.firstChild.style.width = "28px", this.positionMarker = new we.Marker(o).setLngLat([this.point.lng, this.point.lat]).setOffset([0, -14]).addTo(this.map);
8355
+ }
8356
+ },
8355
8357
  handleRender() {
8356
8358
  var t;
8357
8359
  (t = this.positionMarker) == null || t.remove(), this.positionMarker = void 0, this.$nextTick(() => {