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.
- package/js/labelDiv.js +5 -7
- 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
|
|