diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-10-19 13:05:54 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-10-19 13:05:54 +0200 |
| commit | ee38c6aa9adefe4ca3ddc4aef22a216d7fb4c048 (patch) | |
| tree | 47aeb7f620785c59cd0436adb929436b4aa98955 /src/library/boxed.rs | |
| parent | 91e512069396f1de616ec2b0fe0cd31a76e7f2e9 (diff) | |
Allow configuration of directions in page and box ↗
Diffstat (limited to 'src/library/boxed.rs')
| -rw-r--r-- | src/library/boxed.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/library/boxed.rs b/src/library/boxed.rs index 3d7214ae..1ec17d88 100644 --- a/src/library/boxed.rs +++ b/src/library/boxed.rs @@ -9,10 +9,12 @@ use crate::prelude::*; /// - `height`: The height of the box (length or relative to parent's height). pub fn boxed(mut args: Args, ctx: &mut EvalContext) -> Value { let snapshot = ctx.state.clone(); - let body = args.find::<SynTree>().unwrap_or_default(); let width = args.get::<_, Linear>(ctx, "width"); let height = args.get::<_, Linear>(ctx, "height"); + let main = args.get::<_, Spanned<Dir>>(ctx, "main"); + let cross = args.get::<_, Spanned<Dir>>(ctx, "cross"); + ctx.set_flow(Gen::new(main, cross)); args.done(ctx); let flow = ctx.state.flow; |
