mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-14 00:26:51 +08:00
refactor: default-tool box selection (#11800)
### Changed - Rewrite box selection in `default-tool`, the view can decide whether to be selected in box selection by return a boolean value in `onBoxSelected` method - Cleanup unnecessary states in `default-tool` and some naming problem
This commit is contained in:
@@ -6,6 +6,7 @@ import { nothing } from 'lit';
|
||||
import type { BlockService } from '../../extension/index.js';
|
||||
import { GfxControllerIdentifier } from '../../gfx/identifiers.js';
|
||||
import type {
|
||||
BoxSelectionContext,
|
||||
DragMoveContext,
|
||||
GfxViewTransformInterface,
|
||||
SelectedContext,
|
||||
@@ -113,6 +114,8 @@ export abstract class GfxBlockComponent<
|
||||
return true;
|
||||
}
|
||||
|
||||
onBoxSelected(_: BoxSelectionContext) {}
|
||||
|
||||
onRotate() {}
|
||||
|
||||
onResize() {}
|
||||
@@ -231,6 +234,8 @@ export function toGfxBlockComponent<
|
||||
return true;
|
||||
}
|
||||
|
||||
onBoxSelected(_: BoxSelectionContext) {}
|
||||
|
||||
onRotate() {}
|
||||
|
||||
onResize() {}
|
||||
|
||||
Reference in New Issue
Block a user