Skip to main content
Participating Frequently
March 1, 2017
Question

Drag and drop - conditional answers?

  • March 1, 2017
  • 3 replies
  • 495 views

Hi,

I have a drag and drop exercise in which a correctly dropped source stays in target, incorrectly dropped bumps back. 

I have few sources that are the same, lets say: A A B B

And 2 x two targets which take A and B but: only A if B has already been dropped, or only B if A has already been dropped.

So it looks like this:

Target 1a: A

Target 1b: B

Target 2a: A

Target 2b: B

OR:

Target 1a: B

Target 1b: A

Target 2a: B

Target 2b: A

 

OR:

Target 1a: B

Target 1b: A

Target 2a: A

Target 2b: B

OR:

Target 1a: A

Target 1b: B

Target 2a: B

Target 2b: A

And so on...

I hope I've managed to explain what I need

I hoped that somebody knew how to set it up? I know how to create group sources and targets but this seems like a case for conditional drop... accept 'any' A or B unless A has been dropped then accept only any B? How to do that? Is it even possible?

Any ideas?

Cheers

This topic has been closed for replies.

3 replies

Participating Frequently
March 2, 2017

I've had to create D&D that had similar complex behavior which forced figuring out how to essentially bypass the built-in D&D processing and develop directly in Javascript.  It's not documented how to do this, and requires programming skills so it's not "off the shelf" 

Participating Frequently
March 2, 2017

I wish I had your skills! My JavaScript understanding is very general... maybe it's time to skill up

Lilybiri
Brainiac
March 2, 2017

I would need a couple of hours to explore a possible solution, because this will not be easy at all. You can use object actions, but D&D slides have some strict rules that cannot be violated. I wonder if another approach wouldn't be easier, maybe by distributing this over several slides. They can be set up in such a way that the user doesn't even see the transitions to other slides.

Do you need the D&D to be scored? What about resetting the slide after an attempt?

@sdwarwick OP mentioned that incorrect drag sources are already bumped back. It is about changing the D&D correct answer rules when some dragging actions have already been performed.

Participating Frequently
March 2, 2017

Thanks, @lilybiri,  I didn't interpret the poster as having solved that part!  

Participating Frequently
March 2, 2017

can you clarify - are you looking for the "correct answer" to have the A, B pairing,  or actually have the drop rejected and the shape returned to its starting point if an attempt is made to drop a similar shape in the same target?