Fixed drag-and-drop with drag source instead of drag target

This commit is contained in:
Magnus Åhall 2026-06-14 15:02:27 +02:00
parent 63434678ce
commit 04c936e730
2 changed files with 10 additions and 14 deletions

View file

@ -370,7 +370,7 @@ class N2DragIcon extends CustomHTMLElement {
this.style.top = `${e.clientY}px`
})
this.dragTarget = null
this.dragSource = null
}// }}}
start() {// {{{
this.style.display = 'block'
@ -383,11 +383,11 @@ class N2DragIcon extends CustomHTMLElement {
name = '_' + name
this.elIcon.setAttribute('src', `/images/${_VERSION}/icon_drag${name}.svg`)
}// }}}
setTarget(t) {// {{{
this.dragTarget = t
setSource(s) {// {{{
this.dragSource = s
}// }}}
getTarget() {// {{{
return this.dragTarget
getSource() {// {{{
return this.dragSource
}// }}}
}