summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/view/Scrollable.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2015-11-25 04:08:39 -0500
committerJules Laplace <jules@okfoc.us>2015-11-25 04:08:39 -0500
commitf0c551933c5e725b980014b559d757bee99d0536 (patch)
treeba8f090c42934f3ef601eb8d0e42b4398242fc68 /StoneIsland/www/js/lib/view/Scrollable.js
parente024c35a2584f5d975b3b4f8fe942bb8e35b6e47 (diff)
fix auth bugs pt 1
Diffstat (limited to 'StoneIsland/www/js/lib/view/Scrollable.js')
-rw-r--r--StoneIsland/www/js/lib/view/Scrollable.js20
1 files changed, 20 insertions, 0 deletions
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