summaryrefslogtreecommitdiff
path: root/src/doc.rs
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-02-12 21:14:12 +0100
committerLaurenz <laurmaedje@gmail.com>2023-02-12 21:14:12 +0100
commitd689d706eaf3079877406e71b0d642623c9eb230 (patch)
treead0a4b27f919d34d83eacb5ca758293a7e6810f9 /src/doc.rs
parente70fbf5372dcf0c9011f0b7799dfa77194401c4f (diff)
Vertically center non-math content in math by default
Diffstat (limited to 'src/doc.rs')
-rw-r--r--src/doc.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/doc.rs b/src/doc.rs
index 47bdb23d..9fbd9436 100644
--- a/src/doc.rs
+++ b/src/doc.rs
@@ -85,6 +85,11 @@ impl Frame {
self.baseline.unwrap_or(self.size.y)
}
+ /// Whether the frame has a non-default baseline.
+ pub fn has_baseline(&mut self) -> bool {
+ self.baseline.is_some()
+ }
+
/// Set the frame's baseline from the top.
pub fn set_baseline(&mut self, baseline: Abs) {
self.baseline = Some(baseline);