Can't add stickers to stacked cards #27

nedk opened this Issue Jul 8, 2011 · 2 comments

2 participants


Well, you can but the sticker isn't applied to the top card of the stack, it seems to always go on the card below it.

To reproduce:

  • Create 2+ new cards so they're stacked.
  • Apply a sticker to the top card.
  • Move the top card to see the sticker on the card below.

Good point! Will take a look. Maybe I can edit the jquery draggable code to look more at z-index? I use a lot of libraries that do magic..


Ok this is tougher than I thought. In jQueryUI js, on line 2001, it stops running the drop function if one drop has happened. This depends on the order of the elements in the droppables array. These are sorted from the start, not based on z-index.

The two options are to re-sort the droppables array based on z-index (of the parents since the droppable container has a container that contains the z-index) or to change line 2001 so that it creates an array and decides there. But you still have to figure out the effective z-index of the items in the array as they don't have z-indexes set.

We could possible set the z-indexes or some other property of all child elements when a move happens so we don't have look up the tree.

But yeah none of these options are very easy. I haven't been able to find a way to easily see the computed stack order of elements using javascript. This would make this easier.

@aliasaria aliasaria closed this Aug 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment