4xx / svg-edit

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

Selected event doesn't fire when size of rubberbox has been reduced #1111

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Draw some element
2. Select them, hold down yor mouse buttom
3. Reduce size of rubberbox (some elements are removed from selection)

What is the expected output? What do you see instead?
Fire selected event. If you want to display the number of selected elements, 
you should to delegate "selected" event to your counter function. It does not 
work correctly because when you reduce size of selection event doesn't fire.

Please use labels and text to provide additional information.

Please review this patch:
--- D:/Users/user/Desktop/svgcanvas.js  Thu Jun 20 10:58:10 2013
+++ D:/Users/user/Desktop/svgcanvas2.js Thu Jun 20 10:58:51 2013
@@ -1145,6 +1145,8 @@
    }
    // the copy becomes the master now
    selectedElements = newSelectedItems;
+    
+    call("selected", selectedElements);
 };

 // Function: selectAllInCurrentLayer

Original issue reported on code.google.com by hajdua...@gmail.com on 20 Jun 2013 at 9:01