Skip to content

Commit 0930a03

Browse files
authored
fix(bug): fix infinite pendingNodesG appear when holding alt key (#1092)
1 parent 2f2eaef commit 0930a03

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/core/src/plugins/with-moving.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ export function withMoving(board: PlaitBoard) {
5151
if (isKeyHotkey('option', event)) {
5252
event.preventDefault();
5353
if (startPoint && activeElements.length && !PlaitBoard.hasBeenTextEditing(board)) {
54+
if(pendingNodesG) {
55+
PlaitBoard.getElementTopHost(board).removeChild(pendingNodesG);
56+
}
5457
pendingNodesG = drawPendingNodesG(board, activeElements, offsetX, offsetY);
5558
pendingNodesG && PlaitBoard.getElementTopHost(board).append(pendingNodesG);
5659
}

0 commit comments

Comments
 (0)