kimoa / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
3 stars 0 forks source link

Drawing with the pencil tool fires two "elementChanged" events. #763

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. add console.log(elems) to the elementChanged handler (svg-editor.js:706).
2. open a browser a draw a line with the pencil tool.
3. observe 2 new lines in the console, the handler has been called twice.

What is the expected output? What do you see instead?
I expect 1 call per change.

In what browser did you experience this problem? (ALL, Firefox, Opera, etc)
Firefox 3.6.13

In what version of SVG-edit does the problem occur? (Latest trunk, 2.5.1,
etc)
Latest trunk.

Original issue reported on code.google.com by Da.Water...@gmail.com on 24 Jan 2011 at 12:13

GoogleCodeExporter commented 9 years ago
It would good to figure out when these handlers are getting called (upon which 
events, mousedown, mousemove, mouseup, etc).

Original comment by codedr...@gmail.com on 25 Jan 2011 at 8:54

GoogleCodeExporter commented 9 years ago
Fixed in r1938 by removing the call("changed",[element]) under 
smoothPolylineIntoPath. It shouldn't need to be called there as it's already 
called near the end of mouseUp.

Let me know if you can think of any problems with that, codedread.

Original comment by adeve...@gmail.com on 26 Jan 2011 at 5:37