Skip to content

Commit

Permalink
fix(draw): update points when keyup #WIK-15334 (#860)
Browse files Browse the repository at this point in the history
  • Loading branch information
huanhuanwa authored Apr 29, 2024
1 parent caf572b commit c92d05b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tidy-grapes-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@plait/core': patch
---

update points when keyup
2 changes: 1 addition & 1 deletion packages/core/src/plugins/with-moving.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function withMoving(board: PlaitBoard) {

board.keyUp = (event: KeyboardEvent) => {
if (!PlaitBoard.isReadonly(board)) {
if (event.altKey && pendingNodesG && startPoint && activeElements.length && !PlaitBoard.hasBeenTextEditing(board)) {
if (pendingNodesG && startPoint && activeElements.length && !PlaitBoard.hasBeenTextEditing(board)) {
event.preventDefault();
const currentElements = updatePoints(board, activeElements, offsetX, offsetY);
PlaitBoard.getBoardContainer(board).classList.add('element-moving');
Expand Down

0 comments on commit c92d05b

Please sign in to comment.