Skip to content

Commit 804726e

Browse files
fix
1 parent ab17d7a commit 804726e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/components/Board/Board.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,8 +950,7 @@ const Board = React.forwardRef<BoardActions, BoardProps>(
950950
"mouse:down",
951951
function (this: fabricTypes.CanvasAnnotationState, opt) {
952952
const evt = opt.e;
953-
const pointer = editor.canvas.getPointer(opt.e);
954-
setLastPointerPosition(pointer);
953+
955954
if ((evt.button === 0 && !opt.target) || evt.button === 1) {
956955
this.isDragging = true;
957956
this.selection = false;
@@ -1067,6 +1066,8 @@ const Board = React.forwardRef<BoardActions, BoardProps>(
10671066
editor.canvas.on(
10681067
"mouse:move",
10691068
function (this: fabricTypes.CanvasAnnotationState, opt) {
1069+
const pointer = editor.canvas.getPointer(opt.e);
1070+
setLastPointerPosition(pointer);
10701071
if (this.isDragging) {
10711072
// Right mouse button is pressed
10721073
const e = opt.e;

0 commit comments

Comments
 (0)