Skip to content

Commit

Permalink
fix(mind): should not trigger image focus when board is readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
pubuzhixing8 committed Jul 31, 2024
1 parent 9565d90 commit 5b3e894
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/olive-pigs-smell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@plait/mind': patch
---

should not trigger focus when board is readonly
4 changes: 4 additions & 0 deletions packages/mind/src/plugins/with-node-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ export const withNodeImage = (board: PlaitBoard) => {
pointerUp(event);
return;
}
if (PlaitBoard.isReadonly(board)) {
pointerUp(event);
return;
}
const point = toViewBoxPoint(board, toHostPoint(board, event.x, event.y));
const hitElement = getHitElementByPoint(board, point);
const isHitImageResult =
Expand Down

0 comments on commit 5b3e894

Please sign in to comment.