Add workaround for touch events (and remove other workaround that didn't work)

Leaflet doesn't handle touchcancel events in L.Draggable._onDown. Workaround is similar to 1cecbe7f44
This commit is contained in:
fkloft
2013-10-19 19:04:42 +02:00
parent fd90f44def
commit 8be3c99abf
2 changed files with 10 additions and 21 deletions

View File

@ -1,12 +1,6 @@
// created to start cleaning up "window" interaction
//
window.show = function(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) {
@ -26,7 +20,6 @@ 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();
@ -44,20 +37,6 @@ 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();