You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I am a bit confused how to make this work. I have a number of dropzones and draggables and any draggable can be dropped to any dropzone and any of them can swap places with another draggable on enter event. code looks like this:
ondragenter: function(ev) {
interact('.dropped-element').snap({targets: ev.draggable.snap().targets});
}
on debugger I can see that targets for dropped event are changed, but nothing happens. Should I fire some event to make that work? And it says that snap is deprecated on draggable?
The text was updated successfully, but these errors were encountered:
Oh.. actually yes I need to move it in order for snap to work. Is there any workaround for this like firing some event after which snap starts working?
Oh.. actually yes I need to move it in order for snap to work. Is there any workaround for this like firing some event after which snap starts working?
No, there's no work easy workaround at the moment. If you try to use the same pointer move event again, it will be ignored. I'll try to get back to you with a decent work around or implement a proper solution soon.
And it says that snap is deprecated on draggable?
interact(target).snap(snapOptions) is deprecated. Snapping is now configured on a per-action basis so you should do:
// set drag snap optionsinteract(target).draggable({snap: snapOptions});// get drag snap optionsineract(target).draggable().snap
Hello, I am a bit confused how to make this work. I have a number of dropzones and draggables and any draggable can be dropped to any dropzone and any of them can swap places with another draggable on enter event. code looks like this:
ondragenter: function(ev) {
interact('.dropped-element').snap({targets: ev.draggable.snap().targets});
}
on debugger I can see that targets for dropped event are changed, but nothing happens. Should I fire some event to make that work? And it says that snap is deprecated on draggable?
The text was updated successfully, but these errors were encountered: