diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-11-18 15:33:06 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-11-19 22:40:42 +0100 |
| commit | 1937d746abf19a5c1142db546912dbed0e6711fb (patch) | |
| tree | 287a7462720698347361be5d34d61cf7bf3dce45 /library/src/math | |
| parent | 9b8c1dc19fcda399f00e486460b4cc521d1a460b (diff) | |
Show everything!
Diffstat (limited to 'library/src/math')
| -rw-r--r-- | library/src/math/mod.rs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/library/src/math/mod.rs b/library/src/math/mod.rs index 7772c0af..fb53b52d 100644 --- a/library/src/math/mod.rs +++ b/library/src/math/mod.rs @@ -28,15 +28,16 @@ impl MathNode { } impl Show for MathNode { - fn unguard_parts(&self, _: RecipeId) -> Content { - self.clone().pack() - } - fn show(&self, _: Tracked<dyn World>, styles: StyleChain) -> SourceResult<Content> { let mut map = StyleMap::new(); map.set_family(FontFamily::new("NewComputerModernMath"), styles); - let mut realized = self.clone().pack().styled_with_map(map); + let mut realized = self + .clone() + .pack() + .guard(RecipeId::Base(NodeId::of::<Self>())) + .styled_with_map(map); + if self.display { realized = realized.aligned(Axes::with_x(Some(Align::Center.into()))) } |
