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

View File

@@ -103,12 +103,14 @@ export abstract class GfxBlockComponent<
this.model.pop('xywh');
}
onSelected(context: SelectedContext) {
onSelected(context: SelectedContext): void | boolean {
if (context.multiSelect) {
this.gfx.selection.toggle(this.model);
} else {
this.gfx.selection.set({ elements: [this.model.id] });
}
return true;
}
onRotate() {}
@@ -219,12 +221,14 @@ export function toGfxBlockComponent<
}
// eslint-disable-next-line sonarjs/no-identical-functions
onSelected(context: SelectedContext) {
onSelected(context: SelectedContext): void | boolean {
if (context.multiSelect) {
this.gfx.selection.toggle(this.model);
} else {
this.gfx.selection.set({ elements: [this.model.id] });
}
return true;
}
onRotate() {}