mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-27 19:02:23 +08:00
refactor(editor): remove duplicated method (#9451)
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
import { MindmapElementModel } from '@blocksuite/affine-model';
|
||||
import type { Viewport } from '@blocksuite/block-std/gfx';
|
||||
|
||||
export function isMindmapNode(el: BlockSuite.EdgelessModel) {
|
||||
return (
|
||||
el.group instanceof MindmapElementModel || el instanceof MindmapElementModel
|
||||
);
|
||||
}
|
||||
|
||||
export function isSingleMindMapNode(els: BlockSuite.EdgelessModel[]) {
|
||||
return els.length === 1 && els[0].group instanceof MindmapElementModel;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,6 @@ import { state } from 'lit/decorators.js';
|
||||
import { ifDefined } from 'lit/directives/if-defined.js';
|
||||
import { styleMap } from 'lit/directives/style-map.js';
|
||||
|
||||
import { isMindmapNode } from '../../../../_common/edgeless/mindmap/index.js';
|
||||
import type { EdgelessRootBlockComponent } from '../../edgeless-root-block.js';
|
||||
import type {
|
||||
EdgelessFrameManager,
|
||||
@@ -91,6 +90,7 @@ import {
|
||||
isEmbedYoutubeBlock,
|
||||
isFrameBlock,
|
||||
isImageBlock,
|
||||
isMindmapNode,
|
||||
isNoteBlock,
|
||||
} from '../../utils/query.js';
|
||||
import {
|
||||
|
||||
@@ -18,10 +18,8 @@ import {
|
||||
} from '@blocksuite/block-std/gfx';
|
||||
import type { Bound, IVec } from '@blocksuite/global/utils';
|
||||
|
||||
import {
|
||||
isMindmapNode,
|
||||
isSingleMindMapNode,
|
||||
} from '../../../../../_common/edgeless/mindmap/index.js';
|
||||
import { isSingleMindMapNode } from '../../../../../_common/edgeless/mindmap/index.js';
|
||||
import { isMindmapNode } from '../../../utils/query.js';
|
||||
import { DefaultModeDragType, DefaultToolExt, type DragState } from '../ext.js';
|
||||
import { calculateResponseArea } from './drag-utils.js';
|
||||
import type { MindMapIndicatorOverlay } from './indicator-overlay.js';
|
||||
|
||||
Reference in New Issue
Block a user