fix: cannot exit editing mode when click frame body (#11603)

This commit is contained in:
doouding
2025-04-11 03:23:27 +00:00
parent bcd1cd2629
commit 714f2e79dc
6 changed files with 17 additions and 11 deletions
@@ -193,13 +193,15 @@ export class GfxElementModelView<
this.model.xywh = currentBound.moveDelta(dx, dy).serialize();
}
onSelected(context: SelectedContext) {
onSelected(context: SelectedContext): void | boolean {
if (this.model instanceof GfxPrimitiveElementModel) {
if (context.multiSelect) {
this.gfx.selection.toggle(this.model);
} else {
this.gfx.selection.set({ elements: [this.model.id] });
}
return true;
}
}