Skip to content

Commit

Permalink
makes scrollTop attribute configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
chemzqm committed Jul 10, 2017
1 parent a6e0231 commit 9801fa1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Iscroll extends Emitter {
let self = this
if (defineProperty) {
defineProperty(this.scrollable, 'scrollTop', {
configurable: true,
set(v) {
return self.scrollTo(-v, 400)
},
Expand All @@ -64,7 +65,7 @@ class Iscroll extends Emitter {
}
this._refresh = this.refresh.bind(this)
this._unbindresize = resizelistener(this.el, this._refresh)
this.onScrollEnd = debounce(this.onScrollEnd, 30)
this.onScrollEnd = debounce(this.onScrollEnd.bind(this), 30)
this.transformHandlebar = throttle(this.transformHandlebar, 100)
}

Expand Down

0 comments on commit 9801fa1

Please sign in to comment.