Remove pan control from minimap

(basically same issue as c537811e9b996bdcda80510d4e04e17fd3654796)
This commit is contained in:
fkloft 2013-12-08 22:13:09 +01:00
parent d548449933
commit e8db2eac66

View File

@ -26,10 +26,16 @@ window.plugin.panControl.setup = function() {
try { console.log('Loading Leaflet.Pancontrol JS now'); } catch(e) {}
@@INCLUDERAW:external/L.Control.Pan.js@@
try { console.log('done loading Leaflet.Pancontrol JS'); } catch(e) {}
// prevent Pancontrol from being activated by default (e.g. in minimap)
L.Map.mergeOptions({
panControl: false
});
window.map.panControl = L.control.pan({panOffset: 350});
window.map.addControl(window.map.panControl);
if(map.zoomControl._map) { // Move above the zoom control
window.map.removeControl(map.zoomControl);
window.map.zoomControl = L.control.zoom();