Leaflet.Editable icon indicating copy to clipboard operation
Leaflet.Editable copied to clipboard

`preferCanvas: true` map option breaks leaflet editable

Open edclement opened this issue 7 years ago • 1 comments

I spent a few hours trying to figure out why this library wasn't working. Setting map option preferCanvas: true causes any call to map.editTools.start_SHAPE_() to throw errors on each click. Below is the stack trace from the non minified code:

Uncaught TypeError: Cannot read property 'contains' of undefined at NewClass.L.Polygon._containsPoint (Canvas.js:485) at NewClass._handleMouseHover (Canvas.js:366) at NewClass._onMouseMove (Canvas.js:347) at NewClass.wrapperFn (Util.js:89) at HTMLCanvasElement.handler (DomEvent.js:72)

edclement avatar Mar 26 '17 18:03 edclement

Which Leaflet version where you using?

yohanboniface avatar Apr 05 '17 12:04 yohanboniface