fix: handle y port alignment with gates

This commit is contained in:
2026-06-30 21:07:52 +02:00
parent 1533b5ccd4
commit b646d24930

View File

@@ -63,6 +63,12 @@
if to == "out" {
dy = height / 2
} 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
}