fix(drag): while dragging copy marginLeft to show item with right indent
continuous-integration/drone/push Build is passing Details

master
Peter Stuifzand 3 years ago
parent 8167f6d85d
commit c1fe438925

@ -396,15 +396,19 @@ function editor(root, inputData, options) {
}
function enableDragging(rootElement) {
let start = -1;
let startID = null;
let drake = dragula([rootElement], {
moves: function (el, container, handle, sibling) {
return handle.classList.contains('marker')
},
accepts: function (el, target, source, sibling) {
el.style.marginLeft = sibling === null ? 0 : sibling.style.marginLeft
return true
}
})
let start = -1;
let startID = null;
drake.on('drag', function (el, source) {
startID = $(el).attr('data-id')
})

Loading…
Cancel
Save