From 840cdf39595c6b8a29d2c91447d9fb8a91582a59 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Mon, 30 Nov 2015 16:14:29 -0500 Subject: ui changes --- .../platforms/ios/www/js/lib/view/Scrollable.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 StoneIsland/platforms/ios/www/js/lib/view/Scrollable.js (limited to 'StoneIsland/platforms/ios/www/js/lib/view/Scrollable.js') diff --git a/StoneIsland/platforms/ios/www/js/lib/view/Scrollable.js b/StoneIsland/platforms/ios/www/js/lib/view/Scrollable.js new file mode 100644 index 00000000..7cd96f89 --- /dev/null +++ b/StoneIsland/platforms/ios/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