Skip to content

Commit ffbc7ee

Browse files
fix
1 parent 55f064c commit ffbc7ee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/components/Board/Board.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -950,11 +950,8 @@ const Board = React.forwardRef<BoardActions, BoardProps>(
950950
"mouse:down",
951951
function (this: fabricTypes.CanvasAnnotationState, opt) {
952952
const evt = opt.e;
953-
954953
if (
955-
(evt.button === 0 &&
956-
!opt.target &&
957-
!this.drawingObject?.isDrawing) ||
954+
(evt.button === 0 && !opt.target && !drawingObject.isDrawing) ||
958955
evt.button === 1
959956
) {
960957
this.isDragging = true;
@@ -1043,7 +1040,10 @@ const Board = React.forwardRef<BoardActions, BoardProps>(
10431040
"mouse:up",
10441041
function (this: fabricTypes.CanvasAnnotationState, opt) {
10451042
const evt = opt.e as MouseEvent;
1046-
if ([0, 1].includes(evt.button)) {
1043+
if (
1044+
(evt.button === 0 && !opt.target && !drawingObject.isDrawing) ||
1045+
evt.button === 1
1046+
) {
10471047
this.isDragging = false;
10481048
this.selection = true;
10491049
editor.canvas.zoomToPoint(

0 commit comments

Comments
 (0)