refactor(editor): remove gfx tool global type (#12116)

Closes: BS-2650
This commit is contained in:
Saul-Mirone
2025-05-04 13:53:26 +00:00
parent f3b5c36cf7
commit 30a2e5b4fb
95 changed files with 664 additions and 521 deletions
+2 -2
View File
@@ -1,3 +1,4 @@
import { DefaultTool } from '@blocksuite/affine-block-surface';
import type { TextElementModel } from '@blocksuite/affine-model';
import {
FeatureFlagService,
@@ -49,8 +50,7 @@ export class TextTool extends BaseTool {
if (textFlag) {
const [x, y] = this.gfx.viewport.toModelCoord(e.x, e.y);
this.gfx.std.command.exec(insertEdgelessTextCommand, { x, y });
// @ts-expect-error TODO: refactor gfx tool
this.gfx.tool.setTool('default');
this.gfx.tool.setTool(DefaultTool);
} else {
addText(this.gfx, e);
}