diff options
author | zefanja <zefanja@freenet.de> | 2014-04-14 20:57:56 +0700 |
---|---|---|
committer | zefanja <zefanja@freenet.de> | 2014-04-14 20:57:56 +0700 |
commit | b886231b2bf0489830f76501445d2f815d9464c8 (patch) | |
tree | cc05e4f3c92c57a5e2d5263e225883e39e3805f3 /source/main.js | |
parent | 340e447622aed8547b0aa07ceda66b99b1aa7230 (diff) | |
download | biblez-ng-b886231b2bf0489830f76501445d2f815d9464c8.tar.gz |
* updated bcSelector because of API change in sword.js
* fixed bug, when scrolling stops
Diffstat (limited to 'source/main.js')
-rw-r--r-- | source/main.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/main.js b/source/main.js index 9e5ff6f..be3241e 100644 --- a/source/main.js +++ b/source/main.js @@ -613,6 +613,7 @@ enyo.kind({ //handling infinite scrolling handleScrolling: function (inSender, inEvent) { + //FIXME implement enyo.job handling scrolling if(this.verses.length !== 0) { var b = inEvent.scrollBounds; var cHeight = b.clientHeight, @@ -632,13 +633,17 @@ enyo.kind({ if(!this.reachedBottom && cHeight + top > height - 200/* && yDir === 1*/) { this.reachedBottom = true; - //console.log("BOTTOM"); + enyo.job("updateBottom", this.bindSafely(function () { + this.reachedBottom = false; + }), 2000); this.addText(true, enyo.bind(this, function () { this.reachedBottom = false; })); } else if (!this.reachedTop && top < 30/* && yDir === -1*/) { this.reachedTop = true; - //console.log("TOP"); + enyo.job("updateTop", this.bindSafely(function () { + this.reachedTop = false; + }), 2000); this.addText(false, enyo.bind(this, function () { this.reachedTop = false; })); |