Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.147.74.27
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/wordpress/wp-content/plugins/fictional-maps-handler/js/leaflet/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/www/wordpress/wp-content/plugins/fictional-maps-handler/js/leaflet/leaflet.measure.min.js
L.Control.Measure=L.Control.extend({options:{position:"topleft",keyboard:!0,activeKeyCode:"M".charCodeAt(0),cancelKeyCode:27,lineColor:"black",lineWeight:2,lineDashArray:"6, 6",lineOpacity:1,formatDistance:null,textColor:"black"},initialize:function(t){L.Util.setOptions(this,t)},onAdd:function(t){var i=L.DomUtil.create("div","leaflet-control-zoom leaflet-bar leaflet-control");return this._createButton("&#8674;","Measure","leaflet-control-measure leaflet-bar-part leaflet-bar-part-top-and-bottom",i,this._toggleMeasure,this),this.options.keyboard&&L.DomEvent.on(document,"keydown",this._onKeyDown,this),i},onRemove:function(t){this.options.keyboard&&L.DomEvent.off(document,"keydown",this._onKeyDown,this)},_createButton:function(t,i,o,e,s,a){var n=L.DomUtil.create("a",o,e);return n.innerHTML=t,n.href="#",n.title=i,L.DomEvent.on(n,"click",L.DomEvent.stopPropagation).on(n,"click",L.DomEvent.preventDefault).on(n,"click",s,a).on(n,"dbclick",L.DomEvent.stopPropagation),n},_toggleMeasure:function(){this._measuring=!this._measuring,this._measuring?(L.DomUtil.addClass(this._container,"leaflet-control-measure-on"),this._startMeasuring()):(L.DomUtil.removeClass(this._container,"leaflet-control-measure-on"),this._stopMeasuring())},_startMeasuring:function(){this._oldCursor=this._map._container.style.cursor,this._map._container.style.cursor="crosshair",this._doubleClickZoom=this._map.doubleClickZoom.enabled(),this._map.doubleClickZoom.disable(),this._isRestarted=!1,L.DomEvent.on(this._map,"mousemove",this._mouseMove,this).on(this._map,"click",this._mouseClick,this).on(this._map,"dbclick",this._finishPath,this),this._layerPaint||(this._layerPaint=L.layerGroup().addTo(this._map)),this._points||(this._points=[])},_stopMeasuring:function(){this._map._container.style.cursor=this._oldCursor,L.DomEvent.off(this._map,"mousemove",this._mouseMove,this).off(this._map,"click",this._mouseClick,this).off(this._map,"dbclick",this._finishPath,this),this._doubleClickZoom&&this._map.doubleClickZoom.enabled(),this._layerPaint&&this._layerPaint.clearLayers(),this._restartPath()},_mouseMove:function(t){if(t.latlng&&this._lastPoint&&(this._layerPaintPathTemp?(this._layerPaintPathTemp.getLatLngs().splice(0,2,this._lastPoint,t.latlng),this._layerPaintPathTemp.redraw()):this._layerPaintPathTemp=L.polyline([this._lastPoint,t.latlng],{color:this.options.lineColor,weight:this.options.lineWeight,opacity:this.options.lineOpacity,clickable:!1,dashArray:this.options.lineDashArray,interactive:!1}).addTo(this._layerPaint),this._tooltip)){this._distance||(this._distance=0),this._updateTooltipPosition(t.latlng);var i=t.latlng,o=this._lastPoint;console.log(map);var e=map.distance(i,o);this._updateTooltipDistance(this._distance+e,e)}},_mouseClick:function(t){if(t.latlng)if(this._isRestarted)this._isRestarted=!1;else{if(this._lastPoint&&this._tooltip){this._distance||(this._distance=0),this._updateTooltipPosition(t.latlng);var i=t.latlng,o=this._lastPoint,e=map.distance(i,o);this._updateTooltipDistance(this._distance+e,e),this._distance+=e}this._createTooltip(t.latlng),this._lastPoint&&!this._layerPaintPath&&(this._layerPaintPath=L.polyline([this._lastPoint],{color:this.options.lineColor,weight:this.options.lineWeight,opacity:this.options.lineOpacity,clickable:!1,interactive:!1}).addTo(this._layerPaint)),this._layerPaintPath&&this._layerPaintPath.addLatLng(t.latlng),this._lastPoint&&(this._lastCircle&&this._lastCircle.off("click",this._finishPath,this),this._lastCircle=this._createCircle(t.latlng).addTo(this._layerPaint),this._lastCircle.on("click",this._finishPath,this)),this._lastPoint=t.latlng}},_finishPath:function(t){t&&L.DomEvent.preventDefault(t),this._lastCircle&&this._lastCircle.off("click",this._finishPath,this),this._tooltip&&this._layerPaint.removeLayer(this._tooltip),this._layerPaint&&this._layerPaintPathTemp&&this._layerPaint.removeLayer(this._layerPaintPathTemp),this._restartPath()},_restartPath:function(){this._distance=0,this._lastCircle=void 0,this._lastPoint=void 0,this._tooltip=void 0,this._layerPaintPath=void 0,this._layerPaintPathTemp=void 0,this._isRestarted=!0},_createCircle:function(t){return new L.CircleMarker(t,{color:"black",opacity:1,weight:1,fillColor:"white",fill:!0,fillOpacity:1,radius:4,clickable:Boolean(this._lastCircle)})},_createTooltip:function(t){var i=L.divIcon({className:"leaflet-measure-tooltip",iconAnchor:[-5,-5]});this._tooltip=L.marker(t,{icon:i,clickable:!1}).addTo(this._layerPaint)},_updateTooltipPosition:function(t){this._tooltip.setLatLng(t)},_updateTooltipDistance:function(t,i){if(this._tooltip._icon){var o=this._formatDistance(t),e=this._formatDistance(i),s='<div class="leaflet-measure-tooltip-total" style="color:'+this.options.textColor+'">'+o+"</div>";e>0&&o!==e&&(s+='<div class="leaflet-measure-tooltip-difference" style="color:'+this.options.textColor+'">(+'+e+")</div>"),this._tooltip._icon.innerHTML=s}},_formatDistance:function(t){return"function"==typeof this.options.formatDistance?this.options.formatDistance(t):t<1e3?Math.round(t)+"m":Math.round(t/1e3*100)/100+"km"},_onKeyDown:function(t){switch(t.keyCode){case this.options.activeKeyCode:this._measuring||this._toggleMeasure();break;case this.options.cancelKeyCode:this._measuring&&(this._lastPoint?(this._finishPath(),this._isRestarted=!1):this._toggleMeasure())}}}),L.control.measure=function(t){return new L.Control.Measure(t)},L.Map.mergeOptions({measureControl:!1}),L.Map.addInitHook(function(){this.options.measureControl&&(this.measureControl=new L.Control.Measure,this.addControl(this.measureControl))});

Anon7 - 2022
AnonSec Team