fix: beginPath before drawing drag indicator (#9364)

Fixes [BS-2238](https://linear.app/affine-design/issue/BS-2238/frame-套一个-mindmap-,拖动行为不可用)
This commit is contained in:
doouding
2024-12-27 04:02:57 +00:00
parent f336d68866
commit 71272203b0

View File

@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import {
NODE_HORIZONTAL_SPACING,
NODE_VERTICAL_SPACING,
@@ -191,6 +190,7 @@ export class MindMapIndicatorOverlay extends Overlay {
ctx.fillStyle = color;
ctx.lineWidth = 3;
ctx.beginPath();
ctx.roundRect(targetPos.x, targetPos.y, targetPos.w, targetPos.h, 4);
ctx.fill();