fix dragging

pull/4767/head
yann300 6 months ago committed by Joseph Izang
parent 4ba951f3c6
commit 2861bca06e
  1. 4
      libs/remix-ui/workspace/src/lib/utils/getEventTarget.ts

@ -42,15 +42,15 @@ export const buildMultiSelectedItemProfiles = (target: {
} }
}) => { }) => {
const selectItems = [] const selectItems = []
selectItems.push(target)
document.querySelectorAll('li.remixui_selected').forEach(item => { document.querySelectorAll('li.remixui_selected').forEach(item => {
const dragTarget = { const dragTarget = {
position: { top: target?.position.top || 0, left: target?.position.left || 0 }, position: { top: target?.position.top || 0, left: target?.position.left || 0 },
path: item.getAttribute('data-path') || item.getAttribute('data-label-path') || '', path: item.getAttribute('data-path') || item.getAttribute('data-label-path') || '',
type: item.getAttribute('data-type') || item.getAttribute('data-label-type') || '', type: item.getAttribute('data-type') || item.getAttribute('data-label-type') || '',
content: item.textContent || '' content: item.textContent || ''
} }
selectItems.push(dragTarget) if (dragTarget.path !== target.path) selectItems.push(dragTarget)
}) })
return selectItems return selectItems
} }

Loading…
Cancel
Save