summaryrefslogtreecommitdiff
path: root/StoneIsland/platforms/ios/www/js/lib/view/Scrollable.js
blob: 7cd96f8951989072959e9a4baae4cc40d55b16ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var ScrollableView = View.extend({
  
  events: {
    "load img": "deferScrollToTop",
  },

  deferScrollToTop: function(){
    setTimeout(this.scrollToTop.bind(this), 0)
  },
  
  refreshScroller: function(){
    this.scroller.refresh()
  },
  
  scrollToTop: function(){
    this.scroller.refresh()
    app.collection.scroller.scrollTo(0, 0)
  },

})