fix: handle y port alignment with gates #22
@@ -63,6 +63,12 @@
|
|||||||
if to == "out" {
|
if to == "out" {
|
||||||
dy = height / 2
|
dy = height / 2
|
||||||
} else {
|
} else {
|
||||||
|
let all-ports = range(inputs).map(i => "in" + str(i))
|
||||||
|
let i = all-ports.position(p => p == to)
|
||||||
|
assert(
|
||||||
|
i != none,
|
||||||
|
message: "Unknown port '" + y.to + "' must be one of " + repr(all-ports)
|
||||||
|
)
|
||||||
dy = height * (i + 0.5) / inputs
|
dy = height * (i + 0.5) / inputs
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user