Forum Discussion

JenniferMunro-d's avatar
JenniferMunro-d
Community Member
3 years ago

Drag and drop

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 

  • Hey there! You can use shapes, places above the object and target, set at 99 transparency, that go from hidden to normal when you drop the correct choice. 

    • MathNotermans-9's avatar
      MathNotermans-9
      Community Member

      This doesnot work. Its not about locking a target when dropped correctly. Its about limiting targets to 1 drop only. And questions in Storyline always top level. No shape in the timeline can block the choice.

  • Not that I am aware of that is a feature of the freeform drag and drop

  • 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.

    • JenniferMunro-d's avatar
      JenniferMunro-d
      Community Member

      Hi Math

      Thank you for all of your suggestions.  If do do manage to find the examples with javascript, I'd be very interested to see one

      Kind regards

      Jen 

  • Hi Math

    Thanks for analysing Hianna's suggestion and letting us know that it won't meet my needs.

    Kind regards

    Jen 

  • 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

  • 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.

  • 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.

  • 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'.