Skip to content

Commit

Permalink
Fix incorrect coordinates of actions' first move
Browse files Browse the repository at this point in the history
  • Loading branch information
taye committed Sep 13, 2015
1 parent 9260024 commit 5e5a040
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion interact.js
Original file line number Diff line number Diff line change
Expand Up @@ -1725,13 +1725,17 @@
interactions.push(this);
}

// set the startCoords if there was no prepared action
if (!this.prepared.name) {
this.setEventXY(this.startCoords, this.pointers);
}

this.prepared.name = action.name;
this.prepared.axis = action.axis;
this.prepared.edges = action.edges;
this.target = interactable;
this.element = element;

this.setEventXY(this.startCoords, this.pointers);
this.setStartOffsets(action.name, interactable, element);
this.setModifications(this.startCoords.page);

Expand Down

0 comments on commit 5e5a040

Please sign in to comment.