Links wip (broken)

This commit is contained in:
barsdeveloper
2022-03-14 18:58:23 +01:00
parent 8bca6dcff4
commit c4b0dac1b7
10 changed files with 1146 additions and 1083 deletions

View File

@@ -33,6 +33,7 @@ export default class MouseCreateLink extends IMouseClickDrag {
let self = this
this.#mouseenterHandler = e => {
if (!self.enteredPin) {
e.preventDefault()
self.linkValid = false
self.enteredPin = e.target
const a = self.enteredPin, b = self.target
@@ -53,6 +54,7 @@ export default class MouseCreateLink extends IMouseClickDrag {
}
this.#mouseleaveHandler = e => {
if (self.enteredPin == e.target) {
e.preventDefault()
self.enteredPin = null
self.linkValid = false
this.setLinkMessage(LinkMessageElement.placeNode())
@@ -94,6 +96,7 @@ export default class MouseCreateLink extends IMouseClickDrag {
}
this.enteredPin = null
this.link = null
this.#listenedPins = null
}
setLinkMessage(linkMessage) {