mapboxgl-tools 2.2.11 → 2.2.12
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/ui.es.js +10 -0
- package/dist/ui.umd.js +1 -1
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -2471,6 +2471,7 @@ class MeasureDistanceControl extends KeyboardControl {
|
|
|
2471
2471
|
}
|
|
2472
2472
|
}
|
|
2473
2473
|
var control$4 = "";
|
|
2474
|
+
const areaPath = "M146.285714 292.571429v438.857142h73.142857V292.571429zM804.571429 292.571429v438.857142h73.142857V292.571429zM292.571429 219.428571h438.857142V146.285714H292.571429zM292.571429 877.714286h438.857142v-73.142857H292.571429zM345.234286 397.897143l292.571428 292.571428a36.571429 36.571429 0 1 0 51.712-51.712l-292.571428-292.571428a36.571429 36.571429 0 0 0-51.712 51.712zM804.571429 804.571429h73.142857v73.142857h-73.142857v-73.142857z m146.285714-73.142858h-219.428572v219.428572h219.428572v-219.428572zM804.571429 146.285714h73.142857v73.142857h-73.142857V146.285714z m146.285714-73.142857h-219.428572v219.428572h219.428572V73.142857zM146.285714 146.285714h73.142857v73.142857H146.285714V146.285714z m146.285715-73.142857H73.142857v219.428572h219.428572V73.142857zM146.285714 804.571429h73.142857v73.142857H146.285714v-73.142857z m146.285715-73.142858H73.142857v219.428572h219.428572v-219.428572z";
|
|
2474
2475
|
const options$4 = {
|
|
2475
2476
|
title: "\u6D4B\u91CF\u9762\u79EF",
|
|
2476
2477
|
showCloseButton: true,
|
|
@@ -2627,6 +2628,7 @@ class MeasureAreaControl extends KeyboardControl {
|
|
|
2627
2628
|
this._map.on("dblclick", (e2) => {
|
|
2628
2629
|
if (!this.flag)
|
|
2629
2630
|
return;
|
|
2631
|
+
e2.preventDefault();
|
|
2630
2632
|
const coords = [e2.lngLat.lng, e2.lngLat.lat];
|
|
2631
2633
|
this.points.push(coords);
|
|
2632
2634
|
this.measureFlag = false;
|
|
@@ -2643,6 +2645,11 @@ class MeasureAreaControl extends KeyboardControl {
|
|
|
2643
2645
|
if (!this.options.isKeep) {
|
|
2644
2646
|
this._clearLayers();
|
|
2645
2647
|
this._resetData();
|
|
2648
|
+
this.measureFlag = false;
|
|
2649
|
+
this._map.doubleClickZoom.enable();
|
|
2650
|
+
this._map.getCanvas().style.cursor = "";
|
|
2651
|
+
this._onClose();
|
|
2652
|
+
this._container.querySelector(`.${this.mainClass}-entry path`).setAttribute("d", areaPath);
|
|
2646
2653
|
} else {
|
|
2647
2654
|
if (this.options.showCloseButton) {
|
|
2648
2655
|
const ele = document.createElement("div");
|
|
@@ -2963,6 +2970,9 @@ class MouseRectControl extends KeyboardControl {
|
|
|
2963
2970
|
this.options.onEnd && this.options.onEnd({ minX, minY, maxX, maxY, wkt });
|
|
2964
2971
|
if (!this.options.isKeep) {
|
|
2965
2972
|
this._clearDrawLayers();
|
|
2973
|
+
this.flagValue = false;
|
|
2974
|
+
this._onClose();
|
|
2975
|
+
this._container.querySelector(`.${this.mainClass}-entry path`).setAttribute("d", rectPath);
|
|
2966
2976
|
} else {
|
|
2967
2977
|
if (this.options.showCloseButton) {
|
|
2968
2978
|
this._addCloseButton([maxX, maxY]);
|