Inside each item I created a placeholder where I want the element to only be dropped if the mouse is over the placeholder
Tried to check on 'move' but once found the element the check stops working
Tried to check on 'move' but once found the element the check stops working
move(evt) {
let component = evt.relatedContext.component;
if (evt) {
let placeholder =
evt.originalEvent.target.getAttribute("data-placeholder");
console.log(placeholder);
if (placeholder === null) {
console.log("Não dropar");
return false;
}
let groups = component.componentData.groups;
let draggedGroup = evt.draggedContext.element.group;
if (!groups.includes(draggedGroup)) {
console.log("Não Pode");
return false;
}
} else {
return false;
}
},
This approach didn't work
Via Active questions tagged javascript - Stack Overflow https://ift.tt/aShbgIB
Comments
Post a Comment