fix(editor): 多选后,再单选多选中的第一个元素,多选状态没有清除

This commit is contained in:
roymondchen 2022-11-04 19:46:54 +08:00
parent 8d8ef55b81
commit 66e727838b

View File

@ -46,7 +46,7 @@ export const useStage = (stageOptions: StageOptions) => {
]);
stage.on('select', (el: HTMLElement) => {
if (`${editorService.get('node')?.id}` === el.id) return;
if (`${editorService.get('node')?.id}` === el.id && editorService.get('nodes').length === 1) return;
editorService.select(el.id);
});