diff options
| author | sitandr <60141933+sitandr@users.noreply.github.com> | 2023-06-20 17:58:22 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-06-20 16:58:22 +0200 |
| commit | 03675fc429bd4e7aa71890922e359940cbf3c2ca (patch) | |
| tree | 12ded38940afdc682e9d9d5b616ce2499992db15 /library/src/math/op.rs | |
| parent | 6c542ea1a4a0ee85069dad6974ff331851eff406 (diff) | |
Created new system for limits (fixes #1443) (#1452)
Diffstat (limited to 'library/src/math/op.rs')
| -rw-r--r-- | library/src/math/op.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/library/src/math/op.rs b/library/src/math/op.rs index cc57eb61..8ad74c49 100644 --- a/library/src/math/op.rs +++ b/library/src/math/op.rs @@ -26,7 +26,7 @@ pub struct OpElem { #[required] pub text: EcoString, - /// Whether the operator should force attachments to display as limits. + /// Whether the operator should show attachments as limits in display mode. #[default(false)] pub limits: bool, } @@ -39,7 +39,11 @@ impl LayoutMath for OpElem { ctx.push( FrameFragment::new(ctx, fragment.into_frame()) .with_class(MathClass::Large) - .with_limits(self.limits(ctx.styles())), + .with_limits(if self.limits(ctx.styles()) { + Limits::Display + } else { + Limits::Never + }), ); Ok(()) } |
