|
|
@@ -235,6 +235,14 @@ function selectionVisible({ mode, selection, objects, markers, associatedDevices
|
|
|
const targetRow = targetDevice
|
|
|
? (Array.isArray(associatedDevices) ? associatedDevices : []).find((row) => row && row.code === targetDevice)
|
|
|
: null
|
|
|
+ // 当前选择就是定位目标时**直接可见**:用户刚点了「定位设备」,面板必须出来。
|
|
|
+ // 不再要求目标已经出现在图层里 —— 图层补点是异步的(揭示行、坐标准入),
|
|
|
+ // 用它当面板开关会把「还没补上」误判成「不该显示」(维护者 2026-12-02)。
|
|
|
+ const isTarget = current.deviceCode === targetCode
|
|
|
+ || (!current.deviceCode && current.pointCode === targetCode)
|
|
|
+ || (targetDevice && current.deviceCode === targetDevice)
|
|
|
+ if (isTarget) return true
|
|
|
+ // 选择不是定位目标时,仍按「目标是否真的上图」判定。
|
|
|
const targetDrawn = (Boolean(targetCode) && (markers || []).some((marker) => marker && marker.code === targetCode))
|
|
|
|| Boolean(targetRow && targetRow.placement === 'drawn')
|
|
|
if (targetDrawn && (current.deviceCode === targetCode
|