PDA

View Full Version : Drawing sprites with text and connectors



Frith
19 Jun 2013, 7:38 AM
What I'd like to do is create an application that allows a user to draw multiple sprites (basic rectangles or pentagons) that contain updatable text, drag them around and link them with connectors.

I can draw path sprites and I can draw text sprites.

I can drag the sprites around independently but I cannot work out a way to move the text with the 'containing sprite'.

I looked at the sprite.dd.groups but was unable to (understand) use this approach to combine the drag events.

I also looked at a CompositeSprite but this didn't work either.

Has anyone done anything like this that they are willing to share?

slemmon
24 Jun 2013, 11:34 AM
I don't believe there is a way to set up draggable sprite groups (compositeSprites) out of the box. You might check out the private class: Ext.draw.SpriteDD to see how sprite dragging is set up today for individual sprites if you want to set up a sprite dragging solution for groups of sprites.

*I did noticed that setting draggable: true on a sprite is failing on 4.2.x.
There is an open bug for that presently:
http://www.sencha.com/forum/showthread.php?258845