fix: 修复回放模式下机器人笔的可见性和解锁状态设置,确保能够正确聚焦到指定机器人
This commit is contained in:
parent
f14e3a68ad
commit
b7db343ba7
@ -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);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user