mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-21 13:47:37 +08:00
Link direction and minor fixes
This commit is contained in:
@@ -283,12 +283,12 @@ export default class LinkElement extends IFromToPositionedElement {
|
||||
this.origin = pin
|
||||
}
|
||||
|
||||
/** @param {NodeElement} pin */
|
||||
getOtherPin(pin) {
|
||||
if (this.origin?.nodeElement === pin) {
|
||||
/** @param {NodeElement} node */
|
||||
getOtherPin(node) {
|
||||
if (this.origin?.nodeElement === node) {
|
||||
return this.target
|
||||
}
|
||||
if (this.target?.nodeElement === pin) {
|
||||
if (this.target?.nodeElement === node) {
|
||||
return this.origin
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,9 +164,7 @@ export default class PinElement extends IElement {
|
||||
/** @type {PinElement} */
|
||||
let result = this
|
||||
if (ignoreKnots) {
|
||||
if (ignoreKnots) {
|
||||
return this.#traverseKnots(result)?.isOutput()
|
||||
}
|
||||
return this.#traverseKnots(result)?.isOutput()
|
||||
}
|
||||
return result.entity.isOutput()
|
||||
}
|
||||
@@ -242,12 +240,13 @@ export default class PinElement extends IElement {
|
||||
const pinReference = this.createPinReference()
|
||||
if (
|
||||
this.isLinked
|
||||
&& (
|
||||
this.isInput(true)
|
||||
|| this.isOutput(true) && (this.entity.isExecution() || targetPinElement.entity.isExecution())
|
||||
)
|
||||
&& !this.getLinks().some(ref => pinReference.equals(ref))
|
||||
&& this.entity.isExecution()
|
||||
&& this.isOutput(true)
|
||||
&& this.getLinks().some(ref => !pinReference.equals(ref))
|
||||
) {
|
||||
if (this.isKnot()) {
|
||||
|
||||
}
|
||||
this.unlinkFromAll()
|
||||
}
|
||||
if (this.entity.linkTo(targetPinElement.getNodeElement().getNodeName(), targetPinElement.entity)) {
|
||||
|
||||
Reference in New Issue
Block a user