huweili-cesium 1.2.22 → 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 -7
  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: () => {
@@ -323,11 +326,6 @@ export function labelDiv() {
323
326
  return; // 如果已存在,直接返回,不创建新的
324
327
  }
325
328
 
326
- // 机巢无人机不允许打开详情面板和拖拽
327
- if (status === DroneStatus.MACHINE_NEST) {
328
- return;
329
- }
330
-
331
329
  new_detailDivLeft = null;
332
330
  new_detailDivTop = null;
333
331
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "huweili-cesium",
3
- "version": "1.2.22",
3
+ "version": "1.2.23",
4
4
  "description": "基于 Cesium 的地图工具库(无人机态势、轨迹、围栏、工具栏等)",
5
5
  "type": "module",
6
6
  "main": "./index.js",