svgdotjs / svg.draw.js

An extension of svg.js which allows to draw elements with mouse
MIT License
236 stars 57 forks source link

Update svg.draw.js #40

Closed jaweii closed 4 years ago

jaweii commented 6 years ago

Fix: Uncaught TypeError: Cannot read property 'clientX' of undefined

Fuzzyma commented 6 years ago

This PR does not fix the underlying problem. calc needs to be called before stopping the draw because in some cases the last point does not end up where it belongs without it. I think the question is: Why is clientX undefinded and fix that problem