@idmwx/idmui-gl4 0.9.0 → 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
@@ -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(() => {