mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 01:42:55 +08:00
fix: cannot exit editing mode when click frame body (#11603)
This commit is contained in:
@@ -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() {}
|
||||
|
||||
Reference in New Issue
Block a user