Forum Discussion
'Drag Over' state wont reset (File Attached)
Hi all!
I seem to have a problem. I've setup a drag and drop activity where users just need to drag words to one of two options. I applied a 'Drag Over' state to the drop targets. This is just a simple outline appears on the drop target. This seems to work up to the point where the drag item is dropped incorrectly. The item snaps back to its starting position, however the drag over state of the drop target remains.
For this example, drag the first option 'obligations' onto the 'Not Covered' box and let go. You will see it applies the drag over state to Not Covered, but this doesn't reset when I let go of Obligations. Obligations correctly snaps back, but the drag over state remains. It does however correctly switch on and off if I hover the drag item in and out of the drop target and don't let go.
The only way it resets is if I drag the snapped back item back over the drop zone and out again.
Is there a way to make the drop zone state reset to normal when the item is dropped incorrectly? I'm guessing triggers could solve this, but I just wondered if there's a quick reset switch/button I may have missed somewhere?
I've attached the file if anyone is able to help.
Thanks!
1 Reply
- Nathan_HilliardCommunity Member
The auto-return for draggable objects doesn't appear to activate any triggers, like intersect end, focus end, or hover end. Because of this, if states are changed during a drag operation they remain as they were after the auto-return. To get around this, you may have to track your own variables representing 'drag over' actions rather than relying on the built-in system. For example, create a T/F variable for the drop target, set it to true for each drag over operation for your drop items, and trigger a state change for the drop target based on the associated variable change and value. To clear the state change, set the variable to false when each drop item is dropped on the drop target. That way, it only highlights while the item is held over the target.
Related Content
- 10 years ago
- 8 months ago
- 3 months ago