tg-map-vue3 3.4.5 → 3.4.6

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/CHANGELOG.md CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  - feat: 添加矩形[TgRectangle]
6
6
  - feat: 点/圆/矩形/多边形/多段线 在`editable`/`draggable`模式时支持双向绑定
7
+ - fix: 修复[TgCircle]在某些情况下半径会变成0的问题
7
8
  - ***BREAKING CHANGE***: [TgPolygon].polygon, [TgPolyline].polyline 属性, 统一改成`overlay`
8
9
  - ***BREAKING CHANGE***: 修复`setDisableDoubleClickZoom(type)`在google/baidu行为相反的问题, 并且重命名为`setDoubleClickZoom(enable)`
9
10
 
@@ -28,6 +29,7 @@
28
29
  - ***BREAKING CHANGE***: 迁移到Vue3
29
30
 
30
31
  [TgMap]: src/components/TgMap.vue
32
+ [TgCircle]: src/components/overlays/TgCircle.vue
31
33
  [TgRectangle]: src/components/overlays/TgRectangle.vue
32
34
  [TgPolygon]: src/components/overlays/TgPolygon.vue
33
35
  [TgPolyline]: src/components/overlays/TgPolyline.vue
package/dist/tg-map.js CHANGED
@@ -2766,14 +2766,18 @@ class at extends ur {
2766
2766
  static create(e) {
2767
2767
  const r = this.coordType, s = new BMap.Circle(e.center.toBaidu(r), e.radius, {
2768
2768
  enableClicking: e.clickable,
2769
- enableEditing: e.editable,
2769
+ // 详见: {@macros circle.baidu.radius_maybe_zero}
2770
+ enableEditing: !1,
2771
+ // options.editable,
2770
2772
  strokeColor: e.strokeColor,
2771
2773
  strokeOpacity: e.strokeOpacity,
2772
2774
  strokeWeight: e.strokeWeight,
2773
2775
  fillColor: e.fillColor,
2774
2776
  fillOpacity: e.fillOpacity
2775
- });
2776
- return new at(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
2777
+ }), n = new at(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
2778
+ return n.state.editable && setTimeout(() => {
2779
+ n.state.editable && s.enableEditing();
2780
+ }, 0), n;
2777
2781
  }
2778
2782
  createDelegate() {
2779
2783
  return this.eventHubDelegate = new Re(super.createDelegate(), {
@@ -3581,7 +3585,7 @@ class vt extends yt {
3581
3585
  strokeOpacity: e.strokeOpacity,
3582
3586
  strokeWeight: e.strokeWeight
3583
3587
  });
3584
- return new vt(s, r, this, { editable: e.editable === !0 }).visibleOptionInternal(e.visible);
3588
+ return new vt(s, r, this, { editable: !!e.editable }).visibleOptionInternal(e.visible);
3585
3589
  }
3586
3590
  getPath() {
3587
3591
  return this.innerOverlay.getPath().map((e) => y.fromBaidu(e, this.coordType));