vue-draggable-nested-tree icon indicating copy to clipboard operation
vue-draggable-nested-tree copied to clipboard

When inside a div with overflow-y:auto dragging element is off

Open shaydoc opened this issue 7 years ago • 2 comments
trafficstars

If the body has overflow-hidden and the div that the draggable tree component is nested with has overflow-y:auto the dragging element spacing goes way off. This happens after scrolling down in the div

draggingtree

shaydoc avatar Jul 18 '18 15:07 shaydoc

I found that using mouse position solves this rather nicely, any thoughts?

`function resolveDragedElAndInitialPosition(e) { var el0 = opt.getEl ? opt.getEl(dragHandlerEl, opt) : dragHandlerEl; var el = el0;

if (opt.clone) {
  store.triggerEl = el0;
  el = el0.cloneNode(true);
  el0.parentElement.appendChild(el);
}

var pos = offsetToPosition(el, getOffset(el0));
pos.y  = e.pageY;
return {
  position: pos,
  el: el
};

}`

shaydoc avatar Jul 19 '18 13:07 shaydoc

@shaydoc try latest 2.1.3

phphe avatar Aug 10 '18 12:08 phphe