kimoa / svg-edit

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

'Bring to front' doesn't generate an "elementChanged" event. #767

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. Create 2 overlapping objects.
3. Bring the one at the back to the front.

What is the expected output? What do you see instead?
I expect the elementChanged handler to be called, but it isn't.

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 26 Jan 2011 at 11:54

GoogleCodeExporter commented 9 years ago
Ah, another good find.  Would you be interested in starting to write patches to 
fix these things?  Not sure if you've had any experience with Subversion (SVN) 
but let me know if you're interested and I can send you some instructions on 
how you can help.

Original comment by codedr...@gmail.com on 29 Jan 2011 at 8:40

GoogleCodeExporter commented 9 years ago
Yes, I'd be interested. I've used SVN before, the trouble is I'm not yet 
familiar with the code base. I'll see if I can fix this.

Original comment by Da.Water...@gmail.com on 29 Jan 2011 at 12:44

GoogleCodeExporter commented 9 years ago
Great!  If you can figure out how to fix it (probably just fire the changed 
event when moving to top/bottom, but only if it actually changed...) then you 
can do a svn diff > yourpatch.txt and attach that to the bug here.  Thanks!

Original comment by codedr...@gmail.com on 29 Jan 2011 at 4:33

GoogleCodeExporter commented 9 years ago

Original comment by codedr...@gmail.com on 29 Jan 2011 at 4:34

GoogleCodeExporter commented 9 years ago
I think this fixes it.

Original comment by Da.Water...@gmail.com on 30 Jan 2011 at 8:33

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks Da.Waterworth.  I modified your patch a little bit so that the Undo 
command and changed event are only fired if the element has actually moved.  
Fixed in r1952.

Original comment by codedr...@gmail.com on 30 Jan 2011 at 4:50

GoogleCodeExporter commented 9 years ago
Thanks.

Original comment by Da.Water...@gmail.com on 30 Jan 2011 at 7:29