Make the shape selected after drawing
Closed this issue · 5 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
Draw the shape.
What is the expected output? What do you see instead?
It's much more convenient to have the shape auto-selected (and the tool
changed to 'pointer') after drawing. What for?
To make the new shape configurable through properties (fill, stroke), to
allow dragging it instantly after creation.
Original issue reported on code.google.com by emiro...@gmail.com
on 30 Dec 2009 at 2:03
GoogleCodeExporter commented
Well, this is something more specific to a certain application, but the code is
simple,
just add:
{{{
editor.on("addedshape",function(shape){
//change interface here to select tool
editor.setMode("select");
editor.select(shape)
})
}}}
Original comment by Antimatter15
on 30 Dec 2009 at 5:47
- Changed state: WontFix
- Added labels: Priority-Low, Type-Enhancement
- Removed labels: Priority-Medium, Type-Defect
GoogleCodeExporter commented
[deleted comment]
GoogleCodeExporter commented
Thanks for the comment. I'll give it a try tonight.
Original comment by emiro...@gmail.com
on 3 Jan 2010 at 4:34
GoogleCodeExporter commented
This doesn't work.
The event is fired when the shape is created, the mode is changed and future
mouse
moves do not scale/draw the shape.
The mouseup event doesn't look appropriate too as it's fired before the main
processing.
Generally, I think that the events should be fired after they are tracked by
the main
code. Or two events (beforemousemove and mousemove, for example) can be used,
and if
some of the before- event listeners return false, the main processing should
abort.
Original comment by emiro...@gmail.com
on 5 Jan 2010 at 11:28
GoogleCodeExporter commented
not working for me as well following code just enabled select mode as
addedshape called before drawing any object please provide the solution for this
editor.on("addedshape", function(event, shape, no_select){
editor.setMode("select");
editor.select(shape);
});
Original comment by ng...@intellobuild.com
on 26 Apr 2014 at 11:23