diff -r 000000000000 -r c73bb834ccbe src/pyams_gis/resources/js/Edit.Circle.min.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_gis/resources/js/Edit.Circle.min.js Thu May 18 17:23:48 2017 +0200 @@ -0,0 +1,1 @@ +L.Edit=L.Edit||{};L.Edit.Circle=L.Edit.SimpleShape.extend({_createMoveMarker:function(){var a=this._shape.getLatLng();this._moveMarker=this._createMarker(a,this.options.moveIcon)},_createResizeMarker:function(){var a=this._shape.getLatLng(),b=this._getResizeMarkerPoint(a);this._resizeMarkers=[];this._resizeMarkers.push(this._createMarker(b,this.options.resizeIcon))},_getResizeMarkerPoint:function(c){var b=this._shape._radius*Math.cos(Math.PI/4),a=this._map.project(c);return this._map.unproject([a.x+b,a.y-b])},_move:function(b){var a=this._getResizeMarkerPoint(b);this._resizeMarkers[0].setLatLng(a);this._shape.setLatLng(b);this._map.fire(L.Draw.Event.EDITMOVE,{layer:this._shape})},_resize:function(c){var b=this._moveMarker.getLatLng(),a=b.distanceTo(c);this._shape.setRadius(a);this._map.fire(L.Draw.Event.EDITRESIZE,{layer:this._shape})}});L.Circle.addInitHook(function(){if(L.Edit.Circle){this.editing=new L.Edit.Circle(this);if(this.options.editable){this.editing.enable()}}this.on("add",function(){if(this.editing&&this.editing.enabled()){this.editing.addHooks()}});this.on("remove",function(){if(this.editing&&this.editing.enabled()){this.editing.removeHooks()}})}); \ No newline at end of file