File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
mapentity/static/mapentity/Leaflet.MeasureControl Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 2828 this . _map . addLayer ( this . _markerGroup ) ;
2929
3030 this . _markers = [ ] ;
31- this . _map . on ( 'click ' , this . _onClick , this ) ;
31+ this . _map . on ( 'touch ' , this . _onTouch , this ) ;
3232 this . _startShape ( ) ;
3333 }
3434 } ,
4242 this . _map
4343 . off ( 'pointermove' , this . _onMouseMove , this )
4444 . off ( 'mousemove' , this . _onMouseMove , this )
45- . off ( 'click ' , this . _onClick , this ) ;
45+ . off ( 'touch ' , this . _onTouch , this ) ;
4646
4747 this . _clearGuides ( ) ;
4848 this . _container . style . cursor = '' ;
5454 this . _drawing = true ;
5555 this . _poly = new L . Polyline ( [ ] , this . options . shapeOptions ) ;
5656 // this is added as a placeholder, if leaflet doesn't recieve
57- // this when the tool is turned off all onclick events are removed
58- this . _poly . _onClick = function ( ) { } ;
57+ // this when the tool is turned off all onTouch events are removed
58+ this . _poly . _onTouch = function ( ) { } ;
5959
6060 this . _container . style . cursor = 'crosshair' ;
6161
8888 this . _markerGroup . clearLayers ( ) ;
8989 } ,
9090
91- _onClick : function ( ) {
91+ _onTouch : function ( ) {
9292 if ( ! this . _drawing ) {
9393 this . _removeShape ( ) ;
9494 this . _startShape ( ) ;
You can’t perform that action at this time.
0 commit comments