added small clock ports
This commit is contained in:
parent
7da2bb2b64
commit
08f931bbde
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user