From c23c9aa654447f6fe869fbbdd606e30abf10b80e Mon Sep 17 00:00:00 2001
From: ethan <zhufeng_solo@163.com>
Date: Mon, 18 Mar 2024 22:00:30 +0800
Subject: [PATCH] Disable default behavior for double-clicking on entities.

---
 src/base.ts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/base.ts b/src/base.ts
index 4ecc9e9..9b03a41 100644
--- a/src/base.ts
+++ b/src/base.ts
@@ -39,10 +39,15 @@ export default class Base {
     this.cesium = cesium;
     this.viewer = viewer;
     this.type = this.getType();
+
     this.mergeStyle(style);
     this.cartesianToLnglat = this.cartesianToLnglat.bind(this);
     this.pixelToCartesian = this.pixelToCartesian.bind(this);
     this.eventDispatcher = new EventDispatcher();
+    // Disable default behavior for double-clicking on entities.
+    viewer.trackedEntity = undefined;
+    viewer.cesiumWidget.screenSpaceEventHandler.removeInputAction(this.cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK);
+
     this.onClick();
   }