@xingm/vmap-cesium-toolbar 0.0.2-alpha.10 → 0.0.2-alpha.11

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
@@ -1318,10 +1318,15 @@ class D {
1318
1318
  n.ScreenSpaceEventType.LEFT_DOUBLE_CLICK
1319
1319
  ), this.screenSpaceEventHandler.setInputAction(
1320
1320
  (t) => {
1321
- this.isDrawing && (this._doubleClickPending = !0, this.finishDrawing(), e && this.viewer.cesiumWidget.screenSpaceEventHandler.setInputAction(
1321
+ if (!this.isDrawing) return;
1322
+ if (!this.pickGlobePosition(t.position)) {
1323
+ console.warn("Double-click event ignored: not on the map.");
1324
+ return;
1325
+ }
1326
+ this._doubleClickPending = !0, this.finishDrawing(), e && this.viewer.cesiumWidget.screenSpaceEventHandler.setInputAction(
1322
1327
  e,
1323
1328
  n.ScreenSpaceEventType.LEFT_DOUBLE_CLICK
1324
- ));
1329
+ );
1325
1330
  },
1326
1331
  n.ScreenSpaceEventType.LEFT_DOUBLE_CLICK
1327
1332
  );