diff --git a/src/pages/movement-supervision.vue b/src/pages/movement-supervision.vue index 3f973c6..24a543f 100644 --- a/src/pages/movement-supervision.vue +++ b/src/pages/movement-supervision.vue @@ -476,6 +476,20 @@ const isArea = computed(() => current.value?.type === 'area'); const selectRobot = (id: string) => { current.value = { type: 'robot', id }; editor.value?.inactive(); + + // [FIX] In playback mode, robot pens might not be correctly set as visible or unlocked. + // This ensures that gotoById can focus on the robot. + if (isPlaybackMode.value) { + editor.value?.setValue( + { + id, + visible: true, + locked: LockState.None, + }, + { render: false, history: false }, + ); + } + // 聚焦到机器人位置 editor.value?.gotoById(id); };