Fix group overflows #19

Merged
HEL merged 3 commits from fix/issue-18-group-size into dev 2025-07-28 22:18:06 +00:00
2 changed files with 51 additions and 7 deletions
Showing only changes of commit c19d507486 - Show all commits

View File

@@ -1,8 +1,8 @@
#import "/src/cetz.typ": draw, vector
#import "/src/cetz.typ": draw, vector, coordinate
#import "note.typ"
#import "/src/consts.typ": *
#import "/src/core/utils.typ": get-ctx, set-ctx
#import "/src/core/utils.typ": get-ctx, set-ctx, expand-parent-group
#let get-arrow-marks(sym, color) = {
if sym == none {
@@ -223,6 +223,11 @@
).at(seq.comment-align)
}
expand-parent-group(
calc.min(x1, x2, x-mid),
calc.max(x1, x2, x-mid)
)
} else {
pts = (
(x1, start-info.y),
@@ -261,6 +266,11 @@
(p1, p2) = (p2, p1)
}
comment-angle = vector.angle2(p1, p2)
expand-parent-group(
calc.min(x1, x2),
calc.max(x1, x2)
)
}
// Start circle tip
@@ -335,8 +345,23 @@
comment,
anchor: comment-anchor,
angle: comment-angle,
padding: 3pt
padding: 3pt,
name: "comment"
)
// TODO: Improve this
draw.get-ctx(c => {
let (_, left, right) = coordinate.resolve(
c,
"comment.west",
"comment.east"
)
expand-parent-group(
left.at(0),
right.at(0)
)
})
}
if seq.create-dst {