Drag & Drop Conditions and Insertions
I'd really like to be able to say "when I drag this object onto these items, do X but when I don't, do Y."
For example, (Condition 1) when I drag an image into area A, insert that image into area A's horizontal layout. (Condition 2) When I drag the same image into Area B instead, insert that into Area B's horizontal layout. (Condition 3) But when I drag it anywhere else, return it to it's original position and insert it into the appropriate container from whence it came.
My current workflow:
Condition (1) Create an On Drag Stop condition for the intended interaction.
Condition (2) Create an On Drag Stop condition for the second interaction.
Condition (3) This gets more complicated. Let me break it down into parts.
(a) First, because I can't find an "Else" style condition for the On Drag Stop, I need to create a kind of catchment area for when users drop the image outside of area A and area B. To do this, I create a dynamic panel ... it takes up the full screen but sits underneath area A and area B. Let's call this dynamic panel the "noDropArea."
(b) When the page is loaded, the noDropArea is hidden.
(c) When the user starts a drag event, the noDropArea is unhidden.
(d) If the user drops the image from area A onto the noDropArea, the image is first moved back to its original position and, second, inserted into area A. Since the drag event is over and we don't need the onDropArea any more, we hide it away again.
(e) I repeat the above for an image moved from area B.
(f) I set a variable called image1container and set it to "A." When it is moved into area B, I set this variable to B. When the image is moved into the noDropArea, the Insert Into action either puts this image into area A or area B, depending on that variable.
This solution works, but it's totally unscalable. You have to have a different variable for every image and set up a new condition for each new area that you want to add. What if I have ten images that I want to be able to drag and drop between five different containers?
I must be doing something wrong. Please can you suggest a workflow?