Editing multiple graphics at the same time?

2811
5
12-31-2015 01:55 AM
MihkelMänna
Occasional Contributor

I would like to edit multiple graphics at the same time with the Edit widget. I can manage to select the graphics I want to edit, but how could I edit them at the same time? Is it even possible?

Tags (3)
0 Kudos
5 Replies
TyroneBiggums
Occasional Contributor III

Do you have a use case for this to better explain it? Are you talking about re-sizing a graphic to the same scale?

0 Kudos
MihkelMänna
Occasional Contributor

Thanks for the response, Tyrone!

I have graphics that consist of a polygon and a polyline on top of it. What I would want to do is rotate and move the graphics together at the same time. Would it be achievable?

0 Kudos
TyroneBiggums
Occasional Contributor III

You're a step ahead of me b/c you said you were able to select them both? If you're able to put them both in edit mode, I suppose you could have a go at trying to attaching the mouse event to both graphics. I don't see that working out too well though (but, it could be worth a try).

I should say that I do not have any idea if there is some functionality from the API that can accomplish this.

What I would do is just select one graphic, and edit one graphic. As you rotate that graphic, programmatically rotate the other graphic. Does that make sense? I want to say that there is some kind of on rotating type event you could piggy back on to change the graphic not in edit mode.

MihkelMänna
Occasional Contributor

Thanks Tyrone,

The approach you proposed of programmatically changing the other graphic when one graphic is edited is probably the way to go, because I can't put both these graphics into edit mode. When the second graphic's edit session activates, it also deactivates the first graphic's edit session.

0 Kudos
TyroneBiggums
Occasional Contributor III

Ok, I misread what you said about being able to select both graphics in the initial post. I guess you could try to have two edit object instances but then the API would probably get all kinds of confused.

Let us know how it works out. I'm curious.

0 Kudos