added small clock ports

This commit is contained in:
Louis Heredero 2024-05-18 16:46:32 +02:00
parent 7da2bb2b64
commit 08f931bbde
Signed by: HEL
GPG Key ID: 8D83DE470F8544E7

View File

@ -15,11 +15,12 @@
panic("Clock port must have previous and next positions") panic("Clock port must have previous and next positions")
} }
let size = if port.at("small", default: false) {8pt} else {1em}
let offset let offset
if (side == "north") { offset = ( 0, -1em) } if (side == "north") { offset = ( 0, -size) }
else if (side == "east") { offset = (-1em, 0) } else if (side == "east") { offset = (-size, 0) }
else if (side == "south") { offset = ( 0, 1em) } else if (side == "south") { offset = ( 0, size) }
else if (side == "west") { offset = ( 1em, 0) } else if (side == "west") { offset = ( size, 0) }
let pos1 = (rel: offset, to: pos) let pos1 = (rel: offset, to: pos)
@ -96,6 +97,11 @@
let pos-prev = (pt0, pct-prev, pt1) let pos-prev = (pt0, pct-prev, pt1)
let pos-next = (pt0, pct-next, pt1) let pos-next = (pt0, pct-next, pt1)
if port.at("small", default: false) {
pos-prev = (pos, 4pt, pt0)
pos-next = (pos, 4pt, pt1)
}
add-port( add-port(
elmt-id, elmt-id,
side, side,