Skip to main content
edm64045680
Inspiring
November 28, 2017
Question

Can drag sources start off already positioned in a drop target?

  • November 28, 2017
  • 2 replies
  • 844 views

Hello community - this is my first post!

My question is: When a slide loads, with a drag and drop interaction in it, can the drag sources start off already positioned in a drop target? Below is more explanation of what I am trying to achieve and why.

I have five drag sources

I have two drop targets: drop target A and drop target B.

I would like the drag sources to start already in position (tiled) in drop target A.

In the “Accepted Drag Sources”” window for drop target B, Count is set to 1 and On Accept is set to Replace.

When a user drags a drag source from drop target A onto drop target B my variable is incremented by 1.

When user drags another drag source from drop target A onto drop target B the replaced drag source returns to drop target A and my variable is decremented by 1.

I wouThe advanced actions I can deal with, but I'd be very grateful for any guidance around whether I can start a slide with drag sources already positioned in a drop target. Thank you.

    This topic has been closed for replies.

    2 replies

    Stagprime2687219
    Legend
    November 28, 2017

    Perhaps I do not fully understand what is being attempted but I was able to create two shapes and make them two distinct drop targets.

    I then created four stars of different color and made them all drag sources. I placed two in one target and two in the other layered one on top of the other.

    When I previewed the slide I was able to drag them all back and forth from one target to the other target.

    So - in this sense - yes, a slide can start with multiple drag sources already inside of it.

    Make sure the drag sources are the uppermost layers.

    I didn't try to do anything with the actions, though. Perhaps that is the sticking point...?

    What am I missing?

    Stagprime2687219
    Legend
    November 29, 2017

    What does the variable actually track?

    If the value decrements when it is replaced, it doesn't seem to be tracking the quantity of objects on the drop target since a replace condition would be a net change of zero.

    Is the variable tracking the particular object and the status of whether it is on that target or not?

    Greg

    Stagprime2687219
    Legend
    November 29, 2017

    That does help.

    There are likely many ways to skin this one but my first thought without actually mocking something up would be to go ahead and have that drop target for the initial start point for all the drag sources. Make that start drop do all the decrements as appropriate.

    So, the CV drop performs the increment and the start zone drop performs a decrement action.

    When they manually move to the start zone the decrements will happen based on your actions. The increment and decrement actions can also have some state changes (rather than show/hide) with them for updating the blue bars.

    I wonder, though, if you might be able to simply allow them to drop as many as they want onto the zone and remove them as they desire back to the start zone. That would make the setup a bit easier as I don't think we can auto update on replace.

    I think this is doable in the long run but as Rod has suggested, it will require some logic gymnastics.


    One thing I have discovered on complex interactions such as this is that pretty much every advanced action must perform all of the other advanced actions as well since every object that moves must recalculate all the values so that all things can be updated accordingly. It makes for some actions with very long strings of conditional blocks.

    edm64045680
    Inspiring
    November 28, 2017

    Actually it's my second post in the Captivate forum. My mind is turning to mush after so much swotting up on Captivate!

    Lilybiri
    Legend
    November 28, 2017

    One or the requirements for Drag&Drop is that no overlap is allowed between objects. This would mean that your scenario is not possible.

    edm64045680
    Inspiring
    November 28, 2017

    Thank you Liybiri