mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
fix(scrollTo): change parseInt to Math.round
This commit is contained in:
@ -72,10 +72,10 @@ export class ScrollTo {
|
||||
let easedT = easeOutCubic(time);
|
||||
|
||||
if (fromY != y) {
|
||||
self._el.scrollTop = parseInt((easedT * (y - fromY)) + fromY, 10);
|
||||
self._el.scrollTop = Math.round((easedT * (y - fromY)) + fromY);
|
||||
}
|
||||
if (fromX != x) {
|
||||
self._el.scrollLeft = parseInt((easedT * (x - fromX)) + fromX, 10);
|
||||
self._el.scrollLeft = Math.round((easedT * (x - fromX)) + fromX);
|
||||
}
|
||||
|
||||
if (time < 1 && self.isPlaying) {
|
||||
|
Reference in New Issue
Block a user