forked from HEL/circuiteria
Analogous to u-shape's u-side auto-detection: when zigzag-dir is auto (new default), deduce it from the endpoint port anchors by comparing each port's position with its element's .center anchor. East/west ports yield "vertical", north/south yield "horizontal". Panics on conflicting endpoints or when neither endpoint is a port anchor.