Fix script injection, small refactoring

This commit is contained in:
barsdeveloper
2021-12-21 22:03:56 +01:00
parent 8f0893447e
commit 93acfb5d33
9 changed files with 50 additions and 53 deletions

View File

@@ -7,7 +7,8 @@ export default class DragLink extends MouseClickDrag {
}
startDrag() {
//this.selectorElement.startSelecting(this.clickedPosition)
let a = 12
console.log(a)
}
dragTo(location, movement) {

View File

@@ -1,6 +1,6 @@
import MouseClickDrag from "./MouseClickDrag"
export default class Drag extends MouseClickDrag {
export default class DragMove extends MouseClickDrag {
constructor(target, blueprint, options) {
super(target, blueprint, options)

View File

@@ -23,6 +23,7 @@ export default class MouseClickDrag extends Pointing {
case self.clickButton:
// Either doesn't matter or consider the click only when clicking on the parent, not descandants
if (self.looseTarget || e.target == e.currentTarget) {
e.preventDefault()
e.stopPropagation()
self.started = false
// Attach the listeners