diff --git a/src/core/draw/participant/custom.typ b/src/core/draw/participant/custom.typ index b3b6cf2..f605222 100644 --- a/src/core/draw/participant/custom.typ +++ b/src/core/draw/participant/custom.typ @@ -6,13 +6,16 @@ #let render(x, y, p, bottom) = { let style = p.resolved-style + let elmts = (style.image, p.display-name) + if bottom { + elmts = elmts.rev() + } let shape = align( center, stack( dir: ttb, spacing: normalize-units(style.spacing) * 1pt, - style.image, - p.display-name + ..elmts ) ) let anchor = if bottom {"north"} else {"base"} diff --git a/tests/participant/shapes/ref/1.png b/tests/participant/shapes/ref/1.png index 955b123..5052b59 100644 Binary files a/tests/participant/shapes/ref/1.png and b/tests/participant/shapes/ref/1.png differ diff --git a/tests/participant/shapes/test.typ b/tests/participant/shapes/test.typ index c130cdf..557f833 100644 --- a/tests/participant/shapes/test.typ +++ b/tests/participant/shapes/test.typ @@ -15,7 +15,7 @@ _par("Foo5", display-name: "Database", shape: "database") _par("Foo6", display-name: "Collections", shape: "collections") _par("Foo7", display-name: "Queue", shape: "queue") - _par("Foo8", display-name: "Typst", shape: "custom", custom-image: TYPST) - _par("Foo9", display-name: "Ferris", shape: "custom", custom-image: FERRIS) - _par("Foo10", display-name: "Baryhobal", shape: "custom", custom-image: ME) + _par("Foo8", display-name: "Typst", shape: "custom", image: TYPST) + _par("Foo9", display-name: "Ferris", shape: "custom", image: FERRIS) + _par("Foo10", display-name: "Baryhobal", shape: "custom", image: ME) }) \ No newline at end of file