mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 21:27:20 +00:00
refactor(editor): remove dependency of command global types (#9903)
Closes: [BS-2216](https://linear.app/affine-design/issue/BS-2216/remove-global-types-in-command)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { getSelectionRectsCommand } from '@blocksuite/affine-shared/commands';
|
||||
import { matchFlavours } from '@blocksuite/affine-shared/utils';
|
||||
import {
|
||||
BlockSelection,
|
||||
@@ -212,10 +213,13 @@ export class AffineDocRemoteSelectionWidget extends WidgetComponent {
|
||||
|
||||
if (!textSelection && !blockSelections.length) return [];
|
||||
|
||||
const { selectionRects } = this.std.command.exec('getSelectionRects', {
|
||||
textSelection,
|
||||
blockSelections,
|
||||
});
|
||||
const [_, { selectionRects }] = this.std.command.exec(
|
||||
getSelectionRectsCommand,
|
||||
{
|
||||
textSelection,
|
||||
blockSelections,
|
||||
}
|
||||
);
|
||||
|
||||
if (!selectionRects) return [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user