mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-24 18:02:47 +08:00
chore(editor): improve selection of doc in canvas (#11314)
Close [BS-2705](https://linear.app/affine-design/issue/BS-2705/[improvement]-通过-viability-control-选择-hide-in-edgeless) This PR disabled selecting operation of notes that are only shown in page mode.
This commit is contained in:
@@ -10,6 +10,8 @@ import {
|
||||
type ConnectorElementModel,
|
||||
GroupElementModel,
|
||||
MindmapElementModel,
|
||||
NoteBlockModel,
|
||||
NoteDisplayMode,
|
||||
} from '@blocksuite/affine-model';
|
||||
import { resetNativeSelection } from '@blocksuite/affine-shared/utils';
|
||||
import { DisposableGroup } from '@blocksuite/global/disposable';
|
||||
@@ -141,6 +143,12 @@ export class DefaultTool extends BaseTool {
|
||||
if (el instanceof MindmapElementModel) {
|
||||
return bound.contains(el.elementBound);
|
||||
}
|
||||
if (
|
||||
el instanceof NoteBlockModel &&
|
||||
el.props.displayMode === NoteDisplayMode.DocOnly
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user