Skip to content

Commit

Permalink
Grab target and pointer above right-click logic (#3381)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjoesullivan authored and asturur committed Oct 29, 2016
1 parent 17ad789 commit d69d471
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mixins/canvas_events.mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,9 @@
*/
__onMouseDown: function (e) {

var target = this.findTarget(e),
pointer = this.getPointer(e, true);

// if right click just fire events
var isRightClick = 'which' in e ? e.which === 3 : e.button === 2;
if (isRightClick) {
Expand All @@ -457,9 +460,6 @@
return;
}

var target = this.findTarget(e),
pointer = this.getPointer(e, true);

// save pointer for check in __onMouseUp event
this._previousPointer = pointer;

Expand Down

0 comments on commit d69d471

Please sign in to comment.