Skip to content

Commit

Permalink
fix(ionToggle): stop error in edge case of drag ending before raf
Browse files Browse the repository at this point in the history
  • Loading branch information
ajoslin committed May 9, 2014
1 parent a62c54a commit d108a29
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/views/toggleView.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
e.gesture.srcEvent.preventDefault();

ionic.requestAnimationFrame(function(amount) {
if (!self._dragInfo) { return; }

var slidePageLeft = self.track.offsetLeft + (self.handle.offsetWidth / 2);
var slidePageRight = self.track.offsetLeft + self.track.offsetWidth - (self.handle.offsetWidth / 2);
Expand Down

0 comments on commit d108a29

Please sign in to comment.