From f0c551933c5e725b980014b559d757bee99d0536 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 25 Nov 2015 04:08:39 -0500 Subject: fix auth bugs pt 1 --- StoneIsland/www/js/lib/view/Scrollable.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 StoneIsland/www/js/lib/view/Scrollable.js (limited to 'StoneIsland/www/js/lib/view/Scrollable.js') diff --git a/StoneIsland/www/js/lib/view/Scrollable.js b/StoneIsland/www/js/lib/view/Scrollable.js new file mode 100644 index 00000000..7cd96f89 --- /dev/null +++ b/StoneIsland/www/js/lib/view/Scrollable.js @@ -0,0 +1,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) + }, + +}) \ No newline at end of file -- cgit v1.2.3-70-g09d2