feat(content): add scrollToBottom

This commit is contained in:
Adam Bradley
2016-04-18 21:22:39 -05:00
parent 1c755dcb34
commit bef4a67025
3 changed files with 27 additions and 1 deletions

View File

@ -104,6 +104,18 @@ export class ScrollView {
});
}
scrollToTop(duration: number): Promise<any> {
return this.scrollTo(0, 0, duration);
}
scrollToBottom(duration: number): Promise<any> {
let y = 0;
if (this._el) {
y = this._el.scrollHeight - this._el.clientHeight;
}
return this.scrollTo(0, y, duration);
}
stop() {
this.isPlaying = false;
}