Drag and drop

Aug 28, 2022

Hi 

I have created a drag and drop activity (manually not using the built-in option).  

Is there a way to prevent move than one item from being dropped on to each spot.

I have 5 items and 5 spots - I need each item to be on a different spot - no double -ups.  

I have attached a copy of my file with the identifying text etc removed.  

Thanks to anyone who can assist.

Kind regards

Jen 

14 Replies
Math Notermans

A workaround might be creating multiple slides...One with 4,3,2,1 droptargets...and jump to the proper slide when dropped. Not the most efficient and fun workaround to make though ;-)

Another possibility might be Lightboxes with 1 target... Show all at start and hide those dropped... might be difficult to make though.. 

And last but not least...Javascript. I do have some perfect drag and drops entirely build with Javascript. You can do anything with these. When time permits i will find one and share it.

Math Notermans

As i was working on a Javascript based solution for this, running into a similar issue. Basically the targets need to be hidden, blocked or deleted to ensure you cannot drag and drop on it anymore. This lead me to a solution for this directly in Storyline. Adding a state for deleted to a target element and you cannot drag and drop anymore on it.

As in this one.
You still have to work on the correct drop...but at least it prevents adding multiple elements on it.

Kind regards,
Math

Hianna Sabo

Jennifer, 

I re-read your request and wanted to ensure the following solution might not help. 

If you visit the Drag and drop options, there is a "Allow only one item in each drop target" option. Could this help your issue? See attached.

You would need to go to insert> Freeform> drag and drop> click on the form view.

Math Notermans

Your idea works. It does remove the previous dragged item and sets it back to its original position. 'Allow only one item in each drop target' should be read as 'Allow only one item at a time, and snap my previous object back when dragging something else on it'.

So basically it depends on the behaviour the designer/developer wants. If he/she is fine with a selected object jumping back...then 'Allow one item' works fine. If you want to block a selection when dropped on it... ( till some reset ) then it doesnot work and the solution i mentioned earlier works best.

Math Notermans

Here you can see the difference good. First slide is Hianna's solutions, using Freeforms 'Allow only one', notice jumping back when trying to add multiple... and then the next slide is the 'blocked' solution. Notice there you cannot add multiple, after 1 drop its blocked.

https://360.articulate.com/review/content/0554924f-5a81-49e5-bb94-d412ca4ade46/review

The second one is for sure somewhat complexer. As you have to add more triggers, and when all are dropped and you remove one...as is you cannot drop it again...so you need some variables too as in my previous sample to reset a target to 'Normal'.