diff options
| author | Laurenz <laurmaedje@gmail.com> | 2019-11-30 18:54:46 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2019-11-30 18:54:46 +0100 |
| commit | 5782b82770f6923677942c3b4e2bf4f7258e47d8 (patch) | |
| tree | 2b477fc285e9da5380e556648056b985ecbccfe0 /src/library/align.rs | |
| parent | b13ed627fff73a599b34d760cd99aa2f08d58ea8 (diff) | |
Refactor layouting base ♻
Diffstat (limited to 'src/library/align.rs')
| -rw-r--r-- | src/library/align.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/library/align.rs b/src/library/align.rs index 55063ebe..530120e7 100644 --- a/src/library/align.rs +++ b/src/library/align.rs @@ -69,7 +69,7 @@ function! { layout(this, ctx) { let mut axes = ctx.axes; - let primary_horizontal = axes.primary.axis.is_horizontal(); + let primary_horizontal = axes.primary.is_horizontal(); let mut primary = false; let mut secondary = false; @@ -87,7 +87,7 @@ function! { *was_set = true; - let horizontal = axis.axis.is_horizontal(); + let horizontal = axis.is_horizontal(); let alignment = generic_alignment(spec, horizontal)?; if axis.alignment == Alignment::End && alignment == Alignment::Origin { @@ -116,13 +116,13 @@ function! { set_axis(!primary_horizontal, this.vertical)?; Ok(match &this.body { - Some(body) => commands![AddMultiple( + Some(body) => vec![AddMultiple( layout_tree(body, LayoutContext { axes, .. ctx.clone() })? )], - None => commands![Command::SetAxes(axes)] + None => vec![Command::SetAxes(axes)] }) } } |
