Leaflet.Path.Transform icon indicating copy to clipboard operation
Leaflet.Path.Transform copied to clipboard

null _handleLine and _rotationMarker not handled properly

Open alcalin opened this issue 6 years ago • 1 comments

In the example you have provided, if I disable 'rotate' and keep the rest on, I will get some errors in_.nScaleStart and _onScaleEnd

Util.js:59 Uncaught TypeError: Cannot read property '_leaflet_id' of null
    at stamp (Util.js:59)
    at NewClass.removeLayer (Layer.js:180)
    at NewClass._onScaleStart (L.Path.Transform.js:formatted:804)
    at NewClass.fire (Events.js:190)
    at NewClass._fireDOMEvent (Map.js:1433)
    at NewClass._handleDOMEvent (Map.js:1390)
    at HTMLDivElement.handler (DomEvent.js:79)
stamp @ Util.js:59
removeLayer @ Layer.js:180
_onScaleStart @ L.Path.Transform.js:formatted:804
fire @ Events.js:190
_fireDOMEvent @ Map.js:1433
_handleDOMEvent @ Map.js:1390
handler @ DomEvent.js:79
Layer.js:158 Uncaught TypeError: Cannot read property '_layerAdd' of null
    at NewClass.addLayer (Layer.js:158)
    at NewClass._onScaleEnd (L.Path.Transform.js:formatted:827)
    at NewClass.fire (Events.js:190)
    at NewClass._fireDOMEvent (Map.js:1433)
    at NewClass._handleDOMEvent (Map.js:1390)
    at HTMLDivElement.handler (DomEvent.js:79)

Seems that the this._handleLine and this._rotationMarker are null when rotation is disabled. Can anyone else confirm this ?

alcalin avatar Feb 15 '19 11:02 alcalin

I just ran into the same bug. I will enable rotation as a workaround now, thanks for the hint.

dktue avatar Feb 28 '19 14:02 dktue