Drag and Drop question layers

Hi

I am trying to create a 'game' where the user will choose from a main stack of cards and divide them up into two answers stacks. I got the logic to work just fine with the drag and drop question in Lectora, but I would like to have the last card you select to be on top of the pile. So when you select and drag the card from the main stack to one of the answer piles, this card will then be on the top of the pile. Can anyone think of a way to do this? I don't see any way I can change the layering..

I hope that made sense...

Thanks

Tanya

Discussion (4)

Hi Tanya,

When i read this, i am not sure whats the problem. Aint the standard behaviour sufficient ? Does the last chosen element stay at top always... a sample would help... ;-)

If not several options might help. Javascript and z-index come to mind first... and if you want to stay away from JS then you need to find a way to show the chosen card on top after a drop. I think a group with all cards...making sure they are on top...and after a drop always show only the last dropped card in that group might work.

Kind regards,

Math

Allright, tried it and indeed the order stays as initially in the title-explorer. So either you need to get the last dropped to front by changing its z-order ( i do remember javascripts on the forum doing that ) or somehow defining a variable what card/image to show on top.

Hi Math

Thanks for the ideas. I'll look up the z-order and see if I can figure that out.

Regards

Tanya

Hi Tanya,

I mocked up a sample of it here.

https://community.trivantis.com/shared-content/dragdrop-wit-z-index/

Kind regards,

Math

Discussions have been disabled for this post