Leaflet / Leaflet.Editable

Make geometries editable in Leaflet.
http://leaflet.github.io/Leaflet.Editable/doc/api.html
553 stars 198 forks source link

`preferCanvas: true` map option breaks leaflet editable #125

Open edclement opened 7 years ago

edclement commented 7 years ago

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)

yohanboniface commented 7 years ago

Which Leaflet version where you using?