Skip to content

Commit

Permalink
Fix bug where setting evt.x is not possible
Browse files Browse the repository at this point in the history
  • Loading branch information
yishn committed Apr 24, 2017
1 parent 6bafd27 commit 04a0941
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/Goban.js
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,9 @@ class Goban extends Component {
this.mouseDown = false
evt.vertex = currentTarget.dataset.vertex.split('-').map(x => +x)
evt.line = this.state.temporaryLine
evt.x = evt.clientX
evt.y = evt.clientY

if (evt.x == null) evt.x = evt.clientX
if (evt.y == null) evt.y = evt.clientY

if (evt.line) {
onLineDraw(evt)
Expand Down

0 comments on commit 04a0941

Please sign in to comment.