Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Move middle button click check. (#4100)
Browse files Browse the repository at this point in the history
  • Loading branch information
chenba committed Mar 14, 2018
1 parent a1f2822 commit 10b9075
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/src/pages/shot/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,15 +603,15 @@ exports.Editor = class Editor extends React.Component {
this.pos.x = e.clientX - rect.left,
this.pos.y = e.clientY - rect.top
drawMousedown = true;
if (this.isOnUndrawableArea(e)) {
if (this.isOnUndrawableArea(e) || e.button !== 0) {
drawMousedown = false;
}
this.draw(e);
}

draw(e) {
e.preventDefault();
if (!drawMousedown || e.button !== 0) {
if (!drawMousedown) {
return;
}
if (this.state.tool === "highlighter") {
Expand Down

0 comments on commit 10b9075

Please sign in to comment.