|
|
|
@ -416,6 +416,11 @@ const dragStart = (event: MouseEvent, record: Row) => {
|
|
|
|
|
|
|
|
|
|
isDragging.value = false |
|
|
|
|
|
|
|
|
|
dragOffset.value = { |
|
|
|
|
x: event.clientX - target.getBoundingClientRect().left, |
|
|
|
|
y: event.clientY - target.getBoundingClientRect().top, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dragTimeout.value = setTimeout(() => { |
|
|
|
|
if (!isUIAllowed('dataEdit')) return |
|
|
|
|
isDragging.value = true |
|
|
|
@ -423,11 +428,6 @@ const dragStart = (event: MouseEvent, record: Row) => {
|
|
|
|
|
target = target.parentElement as HTMLElement |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
dragOffset.value = { |
|
|
|
|
x: event.clientX - target.getBoundingClientRect().left, |
|
|
|
|
y: event.clientY - target.getBoundingClientRect().top, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const allRecords = document.querySelectorAll('.draggable-record') |
|
|
|
|
allRecords.forEach((el) => { |
|
|
|
|
if (!el.getAttribute('data-unique-id').includes(record.rowMeta.id!)) { |
|
|
|
@ -445,6 +445,12 @@ const dragStart = (event: MouseEvent, record: Row) => {
|
|
|
|
|
|
|
|
|
|
const onMouseUp = () => { |
|
|
|
|
clearTimeout(dragTimeout.value!) |
|
|
|
|
|
|
|
|
|
dragOffset.value = { |
|
|
|
|
x: null, |
|
|
|
|
y: null, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
document.removeEventListener('mouseup', onMouseUp) |
|
|
|
|
if (!isDragging.value) { |
|
|
|
|
emits('expandRecord', record) |
|
|
|
|