From 05a6e311e8a1f63354103d861825669c36bbacc3 Mon Sep 17 00:00:00 2001 From: David Allemang Date: Thu, 1 Oct 2026 10:24:41 -0400 Subject: [PATCH] target attr for dioramas --- lib.typ | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib.typ b/lib.typ index 24c9bcc9..cf01295c 100644 --- a/lib.typ +++ b/lib.typ @@ -52,6 +52,7 @@ loop: auto, subticks: auto, aspect: auto, + target: auto, ) = { let attrs = (:) if theta != auto { attrs.insert("theta", str(theta)) } @@ -65,6 +66,7 @@ if autoplay != auto { attrs.insert("autoplay", if (autoplay) { "" } else { "false" }) } if loop != auto { attrs.insert("loop", if (loop) { "" } else { "false" }) } if subticks != auto { attrs.insert("subticks", if (subticks) { "" } else { "false" }) } - if aspect != auto { attrs.insert("style", "aspect-ratio: " + str(aspect)); } + if aspect != auto { attrs.insert("style", "aspect-ratio: " + str(aspect)) } + if target != auto { attrs.insert("target", target.map(str).join(" ")) } html.elem("mc-diorama", html.script(body, type: "text/mc-world"), attrs: attrs) }