Highlighted

How to keep a drop target from accepting a second drag source

Explorer ,
Sep 25, 2019

Copy link to clipboard

Copied

I thought I remembered seeing an answer to the question I'm going to ask, but I searched and couldn't find it. 

I have a slide that teaches about 8 HR policies. 4 are "do's" (things employees should do) and 4 are "don'ts" (things they should not do). 

I have 8 drag sources and 8 drop targets, each for one policy. As you might expect, 4 of the sources/targets are for the "do's" and 4 are for the "don'ts." I've set it up so any of the do sources can be dropped in any of the do targets. Same for the don'ts. (I don't want to force the learner to drop a source on a certain target in this learning experience.)

Here's a very rough conceptual drawing:
image.png

So far so good.

But as I've done user testing, users are finding they can drop a source on a target where they've already dropped a source. They don't like it--it doesn't make sense, and the 2nd source covers up the first. Of course they can re-drag it to an empty target, but they'd prefer not to have to do that.

So here's my question: Once a source has been dropped on a target, how can I keep the target from accepting another source in the scenario described above, where any target of a certain type accepts any source of the same type?

Thanks in advance for any suggestions!

Kathryn

Most Valuable Participant
Correct answer by Lilybiri | Most Valuable Participant

Gaanf explained exactly what you have to do to prevent having multiple drag sources being accepted by drop targets. 

Maybe you can also take advantage of the InBuilt states for drag sources and drop targets and eventually from the Object actions (which occur immediately after each drag action)?

https://elearning.adobe.com/2017/08/built-in-states-for-dragdrop-objects/

Views

239

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

How to keep a drop target from accepting a second drag source

Explorer ,
Sep 25, 2019

Copy link to clipboard

Copied

I thought I remembered seeing an answer to the question I'm going to ask, but I searched and couldn't find it. 

I have a slide that teaches about 8 HR policies. 4 are "do's" (things employees should do) and 4 are "don'ts" (things they should not do). 

I have 8 drag sources and 8 drop targets, each for one policy. As you might expect, 4 of the sources/targets are for the "do's" and 4 are for the "don'ts." I've set it up so any of the do sources can be dropped in any of the do targets. Same for the don'ts. (I don't want to force the learner to drop a source on a certain target in this learning experience.)

Here's a very rough conceptual drawing:
image.png

So far so good.

But as I've done user testing, users are finding they can drop a source on a target where they've already dropped a source. They don't like it--it doesn't make sense, and the 2nd source covers up the first. Of course they can re-drag it to an empty target, but they'd prefer not to have to do that.

So here's my question: Once a source has been dropped on a target, how can I keep the target from accepting another source in the scenario described above, where any target of a certain type accepts any source of the same type?

Thanks in advance for any suggestions!

Kathryn

Most Valuable Participant
Correct answer by Lilybiri | Most Valuable Participant

Gaanf explained exactly what you have to do to prevent having multiple drag sources being accepted by drop targets. 

Maybe you can also take advantage of the InBuilt states for drag sources and drop targets and eventually from the Object actions (which occur immediately after each drag action)?

https://elearning.adobe.com/2017/08/built-in-states-for-dragdrop-objects/

Views

240

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Sep 25, 2019 0
Engaged ,
Sep 26, 2019

Copy link to clipboard

Copied

Click the first Drop Target to select it, then go to the DRAG AND DROP panel - Format - Object Actions... . Here, uncheck 'Accept All' and make sure 'Count :' is set to 1 (should be by default). With the radio buttons next to 'On Accept :' you can control what should happen if a Drag Source is dropped onto a Drop Target that's already taken by another drag source; either the new one replaces the old, which is sent back to it's original position ('Replace'), or the new one is rejected and sent back to it's original position ('Go Back'), Confirm with OK. Repeat those steps for all Drop Targets.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2019 1
Explorer ,
Sep 26, 2019

Copy link to clipboard

Copied

Gaanf, that worked perfectly! Thank you so much.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2019 0
Most Valuable Participant ,
Sep 26, 2019

Copy link to clipboard

Copied

Gaanf explained exactly what you have to do to prevent having multiple drag sources being accepted by drop targets. 

Maybe you can also take advantage of the InBuilt states for drag sources and drop targets and eventually from the Object actions (which occur immediately after each drag action)?

https://elearning.adobe.com/2017/08/built-in-states-for-dragdrop-objects/

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2019 1
Explorer ,
Sep 26, 2019

Copy link to clipboard

Copied

Lilybiri, great minds--that's exactly what I did 🙂 The dropped sources change color when dropped correctly.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2019 0
Explorer ,
Sep 26, 2019

Copy link to clipboard

Copied

Thank you so much, Gaanf and Lilybiri! The exercise is much better now, thanks to your input.

I realized I have one last question after testing the improved exercise. When I drop a correct source on a spot that already has a correct source, I get the standard failure message. If possible, I need to make the message different when a correct source just won't land because the spot is filled already--it's still in the correct category. I have tried to think of what logic would allow me to do that, but I'm coming up blank. Any ideas?

Thanks again for your help!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2019 0
Engaged ,
Sep 26, 2019

Copy link to clipboard

Copied

Let me first check if I correctly understood: You try to drag a drag source to the correct drop target, but it get rejected there, because the drop target is already taken. So the drag source in question either remains unused or gets eventually dragged to a wrong spot instead because of that. Than you submit the interaction and get the default failure caption. But you'd rather want one specifically for the case that the correct spot was infact attempted. Is it that? Possible, but tricky. You'd have to ditch the standard failure caption, create custom ones for the different 'Failure' scenarios, and then use advanced actions on the drop targets' object actions to first track with variables which drag source was dropped where and second, show the correct custom failure caption based on that. Any particular reason why you would not want to use the 'Replace' setting instead? That would completely avoid the need for such a logic in the first place.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2019 0
Explorer ,
Sep 26, 2019

Copy link to clipboard

Copied

Gaanf, thanks again for taking time to respond! The problem is that I was using a generic failure message: "Sorry, that's incorrect." That message came up whether the drop was in fact wrong, or whether it was actually correct, but dropped on a target that already had an answer in it. I wanted the message to be different in each case. Looks like Lilybiri's answer will solve that. Thanks!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2019 0
Most Valuable Participant ,
Sep 26, 2019

Copy link to clipboard

Copied

Have done something similar (blog post) by replacing the content in the Failure message by a variable, and populating that variable using a conditional action.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2019 0
Engaged ,
Sep 26, 2019

Copy link to clipboard

Copied

Good point! Probably a bit easier to set up.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2019 0
Explorer ,
Sep 26, 2019

Copy link to clipboard

Copied

Aha. That sounds like the way to go. I hadn't thought about using variables in this failure message, though I've done that on other slides. Thanks again, Lilybiri!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Sep 26, 2019 0