Drag and Drop freeform interaction in-built state questions
Mar 22, 2019
By
Allen Wong
Hey guys,
This is something I've noticed for the longest time so I've avoided using it until now.
I have created a drag and drop interaction that has 2 drop area. The draggables can only be dropped on the correct one out of the two. If it's dropped on the wrong one, it returns back to it original spot.
I want the drop areas to use the "drag over" in-built state and respond when ANY draggable is dragged over. However it only works when the correct draggable is dragged over. The incorrect draggables don't register. I must be missing something obvious. Any help would be appreciated. Cheers team.
8 Replies
Good day Allen.
I am not 100% sure if I am understanding your question correctly, but I have attached a file herewith for you to review.
Hope it is (somewhat) what you had in mind.
Hey thanks not too sure if that'll work. I've been playing around with it and got the drag over states on the drop areas to changes properly now but as soon as I drop, those states stick. I've included a story file. Have you seen this kind of thing happen before?
Good day Allen.
I had a look at the file that you attached - I did indeed misunderstood your requirement XD.
Regarding the drop behaviour: I have seen this before. I noticed in numerous occasions that the built-in states behave erratically. In instance is seems to 'lock' the Drag Over state similar to a 'Selected' state.
You can easily fix this by adding a single trigger to your 'Correct' layers (T1 correct & T2 correct) to change the state of the T1/T2 droparea back to the 'Normal' state when the timeline starts.
T1 correct = Change state of T1 droparea to 'Normal' when timeline starts
T2 correct = Change state of T2 droparea to 'Normal' when timeline starts
Hope this helps.
That makes sense actually haha I'll give that a go. Thanks for the help :)
It is only a pleasure. Let me know if it works for you =)
It fixes the states locking when you drop onto the correct hotspot, but if it's an incorrect drop, the drop areas still lock.
Trying to trigger something on "drop incorrect" but not working. A work in progress :P
The nature of the "dragged over" state is based on the object being dragged over correctly to the corresponding drop target. It should not register anything if the object is dragged to the incorrect target. It works the way it should.
What do you need registered when it is incorrectly dragged? Also, since the activity is set to bounce back when dragged incorrectly, logically, there's nothing to register, as it is considered that nothing has happened.
It's the UI I'm trying to use. So basically there are two drop areas that a draggable can be dropped on but only one of them is correct. I want the drag over state register on BOTH drop areas to register that they are the options to give the user a visual cue.
If I don't use the freeform drag and drop interaction I can get it to behave the way I want but I need the stacking option.
This discussion is closed. You can start a new discussion or contact Articulate Support.