Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure that draggable occurs on bound element #557

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions dist/packery.pkgd.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Licensed GPLv3 for open source use
* or Packery Commercial License for commercial use
*
* http://packery.metafizzy.co
* https://packery.metafizzy.co
* Copyright 2013-2018 Metafizzy
*/

Expand Down Expand Up @@ -2757,7 +2757,7 @@ return Item;
* Licensed GPLv3 for open source use
* or Packery Commercial License for commercial use
*
* http://packery.metafizzy.co
* https://packery.metafizzy.co
* Copyright 2013-2018 Metafizzy
*/

Expand Down Expand Up @@ -2841,19 +2841,19 @@ proto._create = function() {
this.handleUIDraggable = {
start: function handleUIDraggableStart( event, ui ) {
// HTML5 may trigger dragstart, dismiss HTML5 dragging
if ( !ui ) {
if ( !ui || ui.helper.index(this) === -1 ) {
return;
}
_this.itemDragStart( event.currentTarget );
},
drag: function handleUIDraggableDrag( event, ui ) {
if ( !ui ) {
if ( !ui || ui.helper.index(this) === -1 ) {
return;
}
_this.itemDragMove( event.currentTarget, ui.position.left, ui.position.top );
},
stop: function handleUIDraggableStop( event, ui ) {
if ( !ui ) {
if ( !ui || ui.helper.index(this) === -1 ) {
return;
}
_this.itemDragEnd( event.currentTarget );
Expand Down
Loading