diff options
| author | Laurenz <laurmaedje@gmail.com> | 2020-01-26 15:51:13 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2020-01-26 15:51:13 +0100 |
| commit | 20fb4e7c379b79b84d9884d5f2c89d781c5793e2 (patch) | |
| tree | a1eef90680afa2b43cb1ce0a687c837fd78810e7 /src/library/layout.rs | |
| parent | 0a087cd28bbee5fcdffbb9d49b0ba9f413ad7f92 (diff) | |
Document everything 📜
Diffstat (limited to 'src/library/layout.rs')
| -rw-r--r-- | src/library/layout.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/library/layout.rs b/src/library/layout.rs index 87e9c357..d36cd0e0 100644 --- a/src/library/layout.rs +++ b/src/library/layout.rs @@ -1,5 +1,4 @@ use crate::size::PSize; -use crate::syntax::func::maps::{AxisMap, PosAxisMap}; use super::*; @@ -21,7 +20,10 @@ function! { layout(self, ctx, errors) { ctx.base = ctx.spaces[0].dimensions; - let map = self.map.dedup(errors, ctx.axes, |alignment| alignment.axis(ctx.axes)); + let map = self.map.dedup(errors, ctx.axes, |alignment| { + alignment.axis().map(|s| s.to_generic(ctx.axes)) + }); + for &axis in &[Primary, Secondary] { if let Some(Spanned { v: alignment, span }) = map.get_spanned(axis) { if let Some(generic) = alignment.to_generic(ctx.axes, axis) { |
