angular-drag-and-drop-lists
angular-drag-and-drop-lists copied to clipboard
figuring out the solution for it. Help me out.
I have 2 separate list in one page and both have this drag and drop features use mostly for re ordering the items.
how I can make both list separate completely as in item A from List 1 should not able to drop in List 2 and vice versa?
According to the documentation this isn't currently supported. At first glance you can solve this by changing the callback in the dragover event handler. ` element.on('dragover', function(event) { event = event.originalEvent || event;
// Check whether the drop is allowed and determine mime type.
var mimeType = getMimeType(event.dataTransfer.types);
var itemType = getItemType(mimeType);
// commenting this line out causes drag events to not resolve. You'll need to add some code to change how this works.
// if (!mimeType || !isDropAllowed(itemType)) return true;
`