metafizzy / packery

:bento: Gapless, draggable grid layouts
https://packery.metafizzy.co
4.13k stars 315 forks source link

Ensure that draggable occurs on bound element #557

Open nickl- opened 3 years ago

nickl- commented 3 years ago

Packery misbehaves when another draggable element is moved which is not the bound element.

See codepen for example and attempt to drag the text "Drag me".

This fixes the bug by checking to ensure that the element bound is actually the element triggering the event.

nickl- commented 3 years ago

Added distribution