move .leaflet-touch disable code elsewhere due to leaflet update

This commit is contained in:
Laura Klünder 2017-10-31 18:00:26 +01:00
parent 6ae559e26a
commit 86b090a29f
2 changed files with 7 additions and 13 deletions

View file

@ -1,11 +1,3 @@
(function () {
if(L.Browser.chrome && !('ontouchstart' in window)) {
L.Browser.pointer = false;
L.Browser.touch = false;
}
}());
editor = {
options: {
position: 'bottomright'
@ -22,6 +14,9 @@ editor = {
editable: true,
closePopupOnClick: false
});
if (L.Browser.chrome && !('ontouchstart' in window)) {
$('.leaflet-touch').removeClass('leaflet-touch');
}
editor.map.on('click', function () {
editor.map.doubleClickZoom.enable();
});

View file

@ -1,9 +1,4 @@
(function () {
if (L.Browser.chrome && !('ontouchstart' in window)) {
L.Browser.pointer = false;
L.Browser.touch = false;
}
/*
* Workaround for 1px lines appearing in some browsers due to fractional transforms
* and resulting anti-aliasing.
@ -426,6 +421,10 @@ c3nav = {
zoomSnap: 0,
zoomControl: false
});
if (L.Browser.chrome && !('ontouchstart' in window)) {
$('.leaflet-touch').removeClass('leaflet-touch');
}
c3nav.map.fitBounds(L.GeoJSON.coordsToLatLngs(c3nav.bounds), c3nav._add_map_padding({}));
c3nav.map.on('moveend', c3nav._map_moved);