Fixed drag-and-drop with drag source instead of drag target
This commit is contained in:
parent
63434678ce
commit
04c936e730
2 changed files with 10 additions and 14 deletions
|
|
@ -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
|
||||
}// }}}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue