summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'StoneIsland/www/js/index.js')
-rwxr-xr-xStoneIsland/www/js/index.js35
1 files changed, 18 insertions, 17 deletions
diff --git a/StoneIsland/www/js/index.js b/StoneIsland/www/js/index.js
index b90f74b1..42cec6f1 100755
--- a/StoneIsland/www/js/index.js
+++ b/StoneIsland/www/js/index.js
@@ -12,26 +12,11 @@ var app = (function(){
sdk.init({ env: "production" })
}
- accessibility.init(app.prebuild) // check if we can do native scrolling before build
- }
-
- app.prebuild = function(){
- app.bind()
- app.build()
-
- app.iscroll_options = {
- mouseWheel: true,
- scrollbars: true,
- disablePointer: is_android ? true : false, // important to disable the pointer events that causes the issues
- disableTouch: false, // false if you want the slider to be usable with touch devices
- disableMouse: false // false if you want the slider to be usable with a mouse (desktop)
- }
-
if (window.cordova) {
- document.addEventListener('deviceready', app.ready, false)
+ document.addEventListener('deviceready', app.device_ready, false)
}
else {
- app.ready()
+ app.device_ready()
}
}
@@ -77,8 +62,24 @@ var app = (function(){
app.selector = new Selector ()
}
+ app.device_ready = function(){
+ accessibility.init(app.ready) // check if we can do native scrolling before build
+ }
+
app.ready = function(){
console.log(">> READY")
+
+ app.bind()
+ app.build()
+
+ app.iscroll_options = {
+ mouseWheel: true,
+ scrollbars: true,
+ disablePointer: is_android ? true : false, // important to disable the pointer events that causes the issues
+ disableTouch: false, // false if you want the slider to be usable with touch devices
+ disableMouse: false // false if you want the slider to be usable with a mouse (desktop)
+ }
+
if (window.cordova) {
document.addEventListener('pause', app.paused, false)
document.addEventListener('resume', app.resumed, false)