mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-14 07:47:29 +08:00
Links fixed
This commit is contained in:
@@ -53,8 +53,15 @@ export default class LinkElement extends IElement {
|
||||
}
|
||||
|
||||
#unlinkPins() {
|
||||
this.#source.unlinkFrom(this.#destination)
|
||||
this.#destination.unlinkFrom(this.#source)
|
||||
if (this.#source && this.#destination) {
|
||||
this.#source.unlinkFrom(this.#destination)
|
||||
this.#destination.unlinkFrom(this.#source)
|
||||
}
|
||||
}
|
||||
|
||||
disconnectedCallback() {
|
||||
super.disconnectedCallback()
|
||||
this.#unlinkPins()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -107,6 +107,7 @@ export default class PinElement extends IElement {
|
||||
*/
|
||||
linkTo(targetPinElement) {
|
||||
this.entity.linkTo(targetPinElement.nodeElement.getNodeName(), targetPinElement.entity)
|
||||
this.template.applyConnected(this)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,6 +115,7 @@ export default class PinElement extends IElement {
|
||||
*/
|
||||
unlinkFrom(targetPinElement) {
|
||||
this.entity.unlinkFrom(targetPinElement.nodeElement.getNodeName(), targetPinElement.entity)
|
||||
this.template.applyConnected(this)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user