Keep draggable item on top
Mar 12, 2020
Hi,
I'm currently creating an interaction in which users must solve a puzzle by dragging and rotating objects. I have not defined drop targets, so users can freely drag the items anywhere on the canvas.
Here are the three items:
After dragging and rotating the objects, the result should look something like this:
However, this result can only be achieved if the object in the middle (the two riders) always appears on top. Even though I placed this item on top in the timeline, in the interaction the last dragged item always appears on top. How can I make sure that one object always appears on top regardless of which item was dropped last?
4 Replies
Hi Stefaan,
If you are only intending to move the horses and will leave the jockeys where they are, you can place the jockeys on a separate layer that shows when the timeline starts for the slide. This will still give you the option to manipulate the horses however you wish to, but will always ensure that the jockeys appear on top when you drop the horses over them, as the horses will remain on the base layer underneath.
If you want to keep as a freeform interaction (items cannot be on layers, you could have a hidden horse underneath in the correct position that changes to normal and change the state of the drop item to transparent (that way it will still be correct.
Good thinking, Ned! I would prefer the jockeys to be draggable and rotatable as well in order to increase the difficulty level. However, I will keep this in mind as a possible back-up solution. Thanks!
Hi Phil, thanks for your suggestion.
But if I understand correctly, the horses would have only one correct position and are not longer draggable once they are dropped in the correct position. Or am I missing something?
This discussion is closed. You can start a new discussion or contact Articulate Support.