Skip to content

Commit

Permalink
fix: coords
Browse files Browse the repository at this point in the history
  • Loading branch information
doouding committed Oct 14, 2024
1 parent a2a7160 commit 84c2af2
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions packages/blocks/src/root-block/edgeless/gfx-tool/default-tool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,10 +480,7 @@ export class DefaultTool extends BaseTool {
} = this._draggingSingleMindmap;
const current = currentNode.element;
const subtree = currentMindmap.getNode(current.id)!;
const [x, y] = this.gfx.viewport.toModelCoord(
this._dragLastPos[0],
this._dragLastPos[1]
);
const [x, y] = this._dragLastPos;

this._clearMindMapHoverState.forEach(fn => fn());
this._clearMindMapHoverState = [];
Expand Down Expand Up @@ -554,10 +551,7 @@ export class DefaultTool extends BaseTool {
}

this._hoveredFrame = this._frameMgr.getFrameFromPoint(
this.gfx.viewport.toModelCoord(
this._dragLastPos[0],
this._dragLastPos[1]
),
this._dragLastPos,
this._toBeMoved.filter(ele => isFrameBlock(ele))
);

Expand Down

0 comments on commit 84c2af2

Please sign in to comment.