fixed new participants not detected in syncs

fixes #20
This commit is contained in:
2026-01-21 16:17:23 +01:00
parent 34ec00768f
commit 4231233f76
3 changed files with 63 additions and 40 deletions

View File

@@ -1,4 +1,5 @@
#import "draw/group.typ": render-end as grp-render-end
#import "draw/sync.typ": render-end as sync-render-end
#import "utils.typ": get-group-span, is-elmt
#import "/src/participant.typ": _exists as par-exists, _par
#import "/src/sequence.typ": _seq
@@ -18,6 +19,24 @@
)
}
#let flatten-sync(elmts, i) = {
let sync = elmts.at(i)
elmts.at(i) = sync
let start = sync
start.remove("elmts")
return (
elmts.slice(0, i) +
(start,) +
sync.elmts +
((
type: "sync-end",
draw: sync-render-end,
elmts: sync.elmts
),) +
elmts.slice(i + 1)
)
}
#let update-group-children(elmts, i) = {
let elmts = elmts
let group-end = elmts.at(i)
@@ -58,6 +77,9 @@
if elmt.type == "grp" {
elmts = flatten-group(elmts, i)
} else if elmt.type == "sync" {
elmts = flatten-sync(elmts, i)
} else if elmt.type == "seq" {
if elmt.enable-dst {