huweili-cesium 1.2.21 → 1.2.23

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.
Files changed (2) hide show
  1. package/js/labelDiv.js +5 -2
  2. package/package.json +1 -1
package/js/labelDiv.js CHANGED
@@ -34,6 +34,9 @@ export function labelDiv() {
34
34
  labelDiv.style.setProperty('--drone-label-bg-color', statusConfig.labelBgColor);
35
35
  }
36
36
 
37
+ // 机巢无人机只展示头顶标签,不允许点击标签弹出可拖拽详情面板
38
+ const isMachineNestDrone = status === DroneStatus.MACHINE_NEST;
39
+
37
40
  // 存储无人机详情面板的位置坐标,用于拖拽功能
38
41
  let new_detailDivLeft = null;
39
42
  let new_detailDivTop = null;
@@ -313,8 +316,8 @@ export function labelDiv() {
313
316
  }
314
317
  };
315
318
 
316
- // 通过无人机id绑定并触发详情面板打开逻辑
317
- const unbindDetailClick = bindDroneLabelDetailHandler({
319
+ // 通过无人机id绑定并触发详情面板打开逻辑(机巢无人机不绑定详情弹窗)
320
+ const unbindDetailClick = isMachineNestDrone ? () => {} : bindDroneLabelDetailHandler({
318
321
  id: labelItem.id,
319
322
  labelEl: labelDiv,
320
323
  openDetail: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huweili-cesium",
3
- "version": "1.2.21",
3
+ "version": "1.2.23",
4
4
  "description": "基于 Cesium 的地图工具库(无人机态势、轨迹、围栏、工具栏等)",
5
5
  "type": "module",
6
6
  "main": "./index.js",