Skip to content

Commit

Permalink
remove float parsing on refresher
Browse files Browse the repository at this point in the history
  • Loading branch information
mlynch committed Dec 17, 2015
1 parent 97bb63e commit 58a80da
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/angular/controller/refresherController.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ IonicModule
}
//if this is a new drag, keep track of where we start
if (startY === null) {
startY = Math.floor(e.touches[0].screenY);
startY = e.touches[0].screenY;
}

// kitkat fix for touchcancel events http://updates.html5rocks.com/2014/05/A-More-Compatible-Smoother-Touch
Expand All @@ -99,7 +99,7 @@ IonicModule
}

// how far have we dragged so far?
deltaY = Math.floor(e.touches[0].screenY) - startY;
deltaY = e.touches[0].screenY - startY;

// if we've dragged up and back down in to native scroll territory
if (deltaY - dragOffset <= 0 || scrollParent.scrollTop !== 0) {
Expand All @@ -110,7 +110,7 @@ IonicModule
}

if (isDragging) {
nativescroll(scrollParent, Math.floor(deltaY - dragOffset) * -1);
nativescroll(scrollParent, deltaY - dragOffset * -1);
}

// if we're not at overscroll 0 yet, 0 out
Expand All @@ -135,7 +135,7 @@ IonicModule

isDragging = true;
// overscroll according to the user's drag so far
overscroll(Math.floor((deltaY - dragOffset) / 3));
overscroll((deltaY - dragOffset) / 3));

// update the icon accordingly
if (!activated && lastOverscroll > ptrThreshold) {
Expand Down

0 comments on commit 58a80da

Please sign in to comment.