I am creating a surface and drawing some shapes onto it. Now doing a
dojo.connect(iSurface.getEventSource(), "mousedown", HandleMouseDown);
and during handler trying to make the target shape moveable.
HandleMouseDown(event)
{
foo = new dojox.gfx.Moveable(event.target);
}
However I keep getting "this.shape.connect is not a function", I think this is due to the fact that event.target is a svg rect not a gfx shape object. Can anyone help me in finding how do I get gfx shape object in the event instead of underlying svg object?
Thanks.
You can provide context as an argument to dojo.connect:
or if shapeObj object belongs to this:
and have this.shapeObj in event handler: