Skip to content

Commit

Permalink
feat: offset angle by 180 for units circle
Browse files Browse the repository at this point in the history
  • Loading branch information
yoannmoinet committed Sep 6, 2015
1 parent ed65d1e commit 3002014
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/nipplejs.js
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,13 @@ Nipple.prototype.onmove = function (evt) {
};

this.computeDirection(evt, toSend);

// Offset angles to follow units circle.
toSend.angle = {
radian: u.radians(180 - angle),
degree: 180 - angle
};

this.trigger('move', toSend);

return false;
Expand Down

0 comments on commit 3002014

Please sign in to comment.