From 084494bec00efce006f586e58a903787dd2c4322 Mon Sep 17 00:00:00 2001 From: Jon Benson Date: Tue, 7 May 2013 17:22:07 +1000 Subject: [PATCH] Zoom control is now only disabled on multitouch capable devices by default and can be forced on again via a preference. --- code/boot.js | 4 +++- mobile/res/values/strings.xml | 2 ++ mobile/res/xml/preferences.xml | 7 ++++++- mobile/src/com/cradle/iitc_mobile/IITC_Mobile.java | 2 -- .../com/cradle/iitc_mobile/IITC_WebViewClient.java | 11 +++++++++++ 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/code/boot.js b/code/boot.js index 6ec417fb..0539fa42 100644 --- a/code/boot.js +++ b/code/boot.js @@ -3,6 +3,8 @@ // created a basic framework. All of these functions should only ever // be run once. +// Used to disable on multitouch devices +window.showZoom = true; window.setupBackButton = function() { var c = window.isSmartphone() @@ -156,7 +158,7 @@ window.setupMap = function() { window.map = new L.Map('map', $.extend(getPosition(), - {zoomControl: !window.isSmartphone()} + {zoomControl: window.showZoom} )); var addLayers = {}; diff --git a/mobile/res/values/strings.xml b/mobile/res/values/strings.xml index 7b991044..b8c76f70 100644 --- a/mobile/res/values/strings.xml +++ b/mobile/res/values/strings.xml @@ -34,6 +34,8 @@ Misc Plugins Available plugins + Show zoom control + Shows +/- buttons even on multitouch capable devices. Display user location Show users position on map Force https diff --git a/mobile/res/xml/preferences.xml b/mobile/res/xml/preferences.xml index 278cb821..3e1efe86 100644 --- a/mobile/res/xml/preferences.xml +++ b/mobile/res/xml/preferences.xml @@ -12,12 +12,17 @@ + - +