Open GoogleCodeExporter opened 9 years ago
You could constantly poll for editor.selected.length==0 as a hack for the time
being
Original comment by Antimatter15
on 5 Jan 2010 at 7:25
Okay, this worked: if (!editor.selected.length && (editor.mode == "select"))
Original comment by emiro...@gmail.com
on 5 Jan 2010 at 11:20
Another related issue (and another argument for the scheme I propose - 2
events).
When the shape is selected I wish the properties elements to reflect its state
(colors, etc).
I do it on selected event, setting the selector color to the shape's attribute.
The
latter trigs the listener that sets the editor's fill/stroke color.
As the event is fired _before_ the shape is actually selected the following
occurs:
1) I select some shape
2) The editor fill color is set to its fill color
3) I click on another shape
4) The 1st shape is still selected, but the selected event is fired
5) The event listener gets the 2nd shape as its argument
6) The event listener gets the 2nd shape fill color and sets it to the color
selector, which trigs the event that globally sets this fill color for the
editor
7) As the 1st shape is actually selected (from the editor's point of view) the
latter
changes causes this 1st shape to get the 2nd shape's fill color
All of this could be probably solved by firing the event after the actual
selection
(and any other processing), as I mentioned.
So, repeating myself, the before-event will allow user making validations and
preventing main processing, while the after-event will allow performing related
actions.
Original comment by emiro...@gmail.com
on 6 Jan 2010 at 12:16
P.S. As a workaround I have manually put the color in the css background of the
selector preview element - the action that is automatically done when the text
element
value is changed
Original comment by emiro...@gmail.com
on 6 Jan 2010 at 12:22
Original issue reported on code.google.com by
emiro...@gmail.com
on 5 Jan 2010 at 5:48