Skip to content

Commit

Permalink
fix(scroll): handle low duration in scrollTo
Browse files Browse the repository at this point in the history
  • Loading branch information
mhartington authored and adamdbradley committed Jan 4, 2017
1 parent 64346bd commit 14eb2fd
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/util/scroll-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,13 @@ export class ScrollView {
return promise;
}

if (duration < 32) {
self.setTop(y);
self.setLeft(x);
done();
return promise;
}

x = x || 0;
y = y || 0;

Expand Down

1 comment on commit 14eb2fd

@dimitri320
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duration of ZERO still doesn't work....

Please sign in to comment.