fixed self-sequence overflow

This commit is contained in:
2025-07-29 00:04:24 +02:00
parent fe01e63dd0
commit c19d507486

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 {