mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-13 15:27:30 +08:00
Minor refactoring
This commit is contained in:
@@ -8,14 +8,15 @@ export default class KnotPinTemplate extends MinimalPinTemplate {
|
||||
return this.element.isOutput() ? super.render() : html``
|
||||
}
|
||||
|
||||
oppositePin() {
|
||||
getoppositePin() {
|
||||
const nodeTemplate = /** @type {KnotNodeTemplate} */(this.element.nodeElement.template)
|
||||
return this.element.isOutput() ? nodeTemplate.inputPin : nodeTemplate.outputPin
|
||||
}
|
||||
|
||||
/** Location on the grid of a link connecting to this pin */
|
||||
getLinkLocation() {
|
||||
if (this.element.isInput()) {
|
||||
return this.oppositePin().getLinkLocation()
|
||||
return this.getoppositePin().getLinkLocation()
|
||||
}
|
||||
return super.getLinkLocation()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user