src/pyams_gis/resources/js/leaflet.Control.Draw.min.js
changeset 0 c73bb834ccbe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_gis/resources/js/leaflet.Control.Draw.min.js	Thu May 18 17:23:48 2017 +0200
@@ -0,0 +1,1 @@
+L.Control.Draw=L.Control.extend({options:{position:"topleft",draw:{},edit:false},initialize:function(a){if(L.version<"0.7"){throw new Error("Leaflet.draw 0.2.3+ requires Leaflet 0.7.0+. Download latest from https://github.com/Leaflet/Leaflet/")}L.Control.prototype.initialize.call(this,a);var b;this._toolbars={};if(L.DrawToolbar&&this.options.draw){b=new L.DrawToolbar(this.options.draw);this._toolbars[L.DrawToolbar.TYPE]=b;this._toolbars[L.DrawToolbar.TYPE].on("enable",this._toolbarEnabled,this)}if(L.EditToolbar&&this.options.edit){b=new L.EditToolbar(this.options.edit);this._toolbars[L.EditToolbar.TYPE]=b;this._toolbars[L.EditToolbar.TYPE].on("enable",this._toolbarEnabled,this)}L.toolbar=this},onAdd:function(e){var b=L.DomUtil.create("div","leaflet-draw"),c=false,f="leaflet-draw-toolbar-top",a;for(var d in this._toolbars){if(this._toolbars.hasOwnProperty(d)){a=this._toolbars[d].addToolbar(e);if(a){if(!c){if(!L.DomUtil.hasClass(a,f)){L.DomUtil.addClass(a.childNodes[0],f)}c=true}b.appendChild(a)}}}return b},onRemove:function(){for(var a in this._toolbars){if(this._toolbars.hasOwnProperty(a)){this._toolbars[a].removeToolbar()}}},setDrawingOptions:function(a){for(var b in this._toolbars){if(this._toolbars[b] instanceof L.DrawToolbar){this._toolbars[b].setOptions(a)}}},_toolbarEnabled:function(c){var b=c.target;for(var a in this._toolbars){if(this._toolbars[a]!==b){this._toolbars[a].disable()}}}});L.Map.mergeOptions({drawControlTooltips:true,drawControl:false});L.Map.addInitHook(function(){if(this.options.drawControl){this.drawControl=new L.Control.Draw();this.addControl(this.drawControl)}});
\ No newline at end of file