Can't submit unless all drag items are currently on a drop target. HELP

Hi, I have been trying to make a drag and drop interaction and in doing so I have ended up with MANY triggers that are all necessary so far. I was really close to achieving the desired outcome of the slide however now I am again a little stuck. I have a button which is initially set to hidden and becomes visible when each drop target has had a drag item land on it.

Unfortunately I have had to create my own drop correct and drop incorrect states for each drag item due to the trigger for changing the button to visible from hidden when all of the drag items ARE NOT = Normal. For some reason the 'Are not' trigger wouldn't work with the built in states. I have then created a state called 'dropped' on each target which changes when any of the drag items and moved on to it. So what I have so far is the submit button becoming visible when all of the drag items are not normal and all of the drop targets are in the state of 'dropped'.

Here's the issue. When the submit button becomes visible; if i then drag one of the drag items from one of the targets the button still remains visible and allowing me to submit (which I don't want.) Also if I drop a item on a target which is already in use, the previously dropped item returns to the starting point and I can still click the button. I've tried to think of ways of hiding the button again by using a variable but i ended up giving up. I basically need all drop targets to be full before you can submit. 

I've attached my file in case anyone wants to look and might have a way of hiding the button again in the case of an item being dragged out of a target or replaced by another item.

 

5 Replies
Walt Hamilton

I haven't looked at it very closely, but here is what I do when I am creating an interaction like this. Under each of the drop states, and just a little larger on all sides, I place a shape that is 100% transparent, so it is invisible. Then I write a trigger to change the target to show the target has nothing dropped on it if the user DRAGS something over the invisible shape. That way when something is dragged off, it doesn't think it is still on the target.

Lewis Berry

Hi, thank you for your comment. I had initially tried using a hotspot like this, by placing it under the start position of the drag items so that if the user dragged one of the drag items off a drop target it would then trigger the submit button the the hidden state again. This solves 50% of the problem. What it unfortunately didn't fix was the instance of replacing an already in use drop target with another used drag item. When the drag item which is being replaced is automatically sent back to its initial starting point, it doesn't register that it has been dropped on the shape or hotspot underneath.

It seems like it should be a reasonable thing to accomplish but i'm starting to think otherwise. If only there was a trigger for when 'drop target is in use'!