Gisellameloni / svg-edit

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

clearSelection should reset the selectedElements array, not only release the elements #1228

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I experienced a bug with misbehaving selections after ungrouping a set of 
elements. resetting the selectedElements array fixed it. i couldn't find any 
need to keep the nulled elements in the array after clearSelection.

How to reproduce: 

1. create a group of 3 elements.
2. create 10 different elements
3. select the 10 elements 
4. check in console output of svgEditor.canvas.getSelectedElems()
5. ungroup the group from #1
6. check in console output of svgEditor.canvas.getSelectedElems()
7. click on free space, selection should be canceled
8. some elements of the group are still in the selectedElements array and are 
still shown as selected

Original issue reported on code.google.com by ber...@gmail.com on 8 Jul 2014 at 2:47

Attachments: