diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2019-09-03 19:29:08 +0200 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2019-09-03 19:29:08 +0200 |
| commit | 4ed316ba420c5a07338f783c942dce800f14476f (patch) | |
| tree | e962352207706b0101700b59880c8195f5680059 /StoneIsland/platforms/ios/www/js/lib/etc/scroll.js | |
| parent | 589c423f3d2d4d65347fbd074b71cc067541c477 (diff) | |
rebuild app
Diffstat (limited to 'StoneIsland/platforms/ios/www/js/lib/etc/scroll.js')
| -rw-r--r-- | StoneIsland/platforms/ios/www/js/lib/etc/scroll.js | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/StoneIsland/platforms/ios/www/js/lib/etc/scroll.js b/StoneIsland/platforms/ios/www/js/lib/etc/scroll.js new file mode 100644 index 00000000..253921e1 --- /dev/null +++ b/StoneIsland/platforms/ios/www/js/lib/etc/scroll.js @@ -0,0 +1,29 @@ +// stub for native scroller when in voiceover mode +function NativeScroll(el) { + var Scroller = { + x: 0, + y: 0, + $el: $(el), + } + + Scroller.refresh = function(){} + Scroller.on = function(){} + Scroller.off = function(){} + + Scroller.scrollTo = function(x, y) { + Scroller.$el.scrollTop(y) + } + Scroller.scrollToElement = function(selector) { + var y = $(selector).offset().top + Scroller.$el.scrollTop(y) + } + + return Scroller +} + +function ScrollFactory (el, opt) { + if (accessibility.voiceOver) { + return NativeScroll(el) + } + return new IScroll(el, opt) +} |
