packery icon indicating copy to clipboard operation
packery copied to clipboard

Dragged items can overlap

Open desandro opened this issue 11 years ago • 17 comments

  1. When using a multi-touch device, you can drag two items on top of one another
  2. When a dragged item is being positioned into place, during its transition, you can drag another item on top of it.

Add a 👍 reaction to this issue if you would like to see this issue fixed. +1 comments will be deleted.

desandro avatar Apr 15 '13 11:04 desandro

I too can reproduce this behaviour within Chrome and Safari on OS X. Happy to supply more info if required.

newtriks avatar May 06 '13 18:05 newtriks

In addition, from #49, Dragging an item over a stamped item places that item on the stamp. See http://codepen.io/seraphzz/pen/nsEAc

desandro avatar Jul 21 '13 03:07 desandro

I'd definitely like to see a solution to this too, specifically the ex-#49 drag-on-stamp issue.

mattlohkamp avatar Aug 21 '13 23:08 mattlohkamp

I too would really need to get #49 to work so i can use it in an implementation i am working on.

marvidude avatar Oct 09 '13 21:10 marvidude

For the #49 issue, I've found that it can work if you call layout() after dragItemPositioned occurs -- nothing will be overlapping following the layout() call. But, it's not very smooth because the user sees the item slide into one place (over the stamped item), and then only after that animation is complete, jump to a whole new second position.

But, if layout() can properly layout the items around the stamped item, it should be possible to make the laying out that occurs during or after drag do this too.

travisp avatar Nov 07 '13 16:11 travisp

Any progress / workarounds on this?

pstinnett avatar Feb 11 '14 16:02 pstinnett

Loving Packery but this is preventing us using it commercially. Any progress on a fix?

andrewhickey avatar Mar 19 '14 16:03 andrewhickey

Same here. We were planning on using this library commercially (packery w/ draggabilly) but will need to have this issue fixed or find a different solution. I would prefer to use packery since everything else about it is so slick.

chevas avatar Mar 27 '14 23:03 chevas

Has anyone figured out a workaround for this yet?

benheymink avatar Apr 15 '14 09:04 benheymink

I think a delayed call of .layout(); would reorder the elements. But this only works after the drop.

I'am also searching for a solution which would work already while dragging, so that it's not possibile to drop an element on a stamped element.

mfrosch avatar Apr 15 '14 10:04 mfrosch

Yep, calling layout again does 'work', just not ideal :)

benheymink avatar Apr 15 '14 10:04 benheymink

I submitted a pull request (https://github.com/metafizzy/packery/pull/203) to disallow an item to be dragged over a stamped item.

drewpc avatar Aug 18 '14 23:08 drewpc

This should help:

$itemElems.bind("dragstart", function() {
    $(this).css("z-index", 2147483647);
}).bind("dragstop", function() {
    $(this).css("z-index", "auto");
});         

mathjazz avatar Nov 12 '14 11:11 mathjazz

Hey, is there any fix on the way for this? Count me in for the group of people who would love to use this in a commercial project but are having trouble because of this bug. The layout workaround isn't ideal either.

john-osullivan avatar Jul 06 '15 20:07 john-osullivan

I'm joining the list of people who would like to see this issue officially resolved. I field tested the "workaround" and it was very confusing/distracting for users.

sephus avatar Aug 07 '15 13:08 sephus

Yet another person here wanting to use this for a commercial project, this would be great (if not necessary) to have.

SirZdanius avatar Jun 22 '18 12:06 SirZdanius

@SirZdanius bumping a 5-year old & nearly 3-year stale issue:

That's a bold strategy, Cotton; let's see if it pays off for him

john-osullivan avatar Jun 26 '18 05:06 john-osullivan