- disable all map properties when switching to another pane

- bumped mobile version number
This commit is contained in:
Philipp Schaefer 2013-10-17 00:59:22 +02:00
parent d0408d1f49
commit 3b6533c7dc
2 changed files with 25 additions and 3 deletions

View File

@ -1,10 +1,17 @@
// created to start cleaning up "window" interaction
//
window.show = function(id) {
window.hideall();
if (typeof android !== 'undefined' && android && android.switchToPane) {
android.switchToPane(id);
}
/*
* disable all map properties when switching to another pane
* because sometimes (bug?) touch events are passed to the map when
* other panes are focussed
*/
window.disableMapProperties();
window.hideall();
switch(id) {
case 'full':
window.chat.show('full');
@ -22,6 +29,7 @@ window.show = function(id) {
window.debug.console.show();
break;
case 'map':
window.enableMapProperties();
window.smartphone.mapButton.click();
$('#portal_highlight_select').show();
$('#farm_level_select').show();
@ -35,6 +43,20 @@ window.show = function(id) {
}
}
window.enableMapProperties = function() {
window.map.tap.enable();
window.map.dragging.enable();
window.map.touchZoom.enable();
window.map.doubleClickZoom.enable();
}
window.disableMapProperties = function() {
window.map.tap.disable();
window.map.dragging.disable();
window.map.touchZoom.disable();
window.map.doubleClickZoom.disable();
}
window.hideall = function() {
$('#chatcontrols, #chat, #chatinput, #sidebartoggle, #scrollwrapper, #updatestatus, #portal_highlight_select').hide();
$('#farm_level_select').hide();

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cradle.iitc_mobile"
android:versionCode="54"
android:versionName="0.7.4">
android:versionCode="55"
android:versionName="0.7.5">
<uses-sdk
android:minSdkVersion="14"