diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-21 00:16:07 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-21 00:26:20 +0100 |
| commit | ee732468c7487c81aa6470571077988b75d36ebb (patch) | |
| tree | e0361bb75b8bbc3359b711f4009e165459d66248 /library/src/layout/transform.rs | |
| parent | 15cd273c82a96128a63781981a4405fcd2b1e846 (diff) | |
Document text category
Diffstat (limited to 'library/src/layout/transform.rs')
| -rw-r--r-- | library/src/layout/transform.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/library/src/layout/transform.rs b/library/src/layout/transform.rs index 92a31780..57a6c069 100644 --- a/library/src/layout/transform.rs +++ b/library/src/layout/transform.rs @@ -31,6 +31,7 @@ use crate::prelude::*; /// ### Example /// ``` /// Hello, world!#move(dy: -2pt)[!]#move(dy: 2pt)[!] +/// ``` /// /// - dx: Rel<Length> (named) /// The horizontal displacement of the content. @@ -61,6 +62,13 @@ impl MoveNode { } .pack()) } + + fn field(&self, name: &str) -> Option<Value> { + match name { + "body" => Some(Value::Content(self.body.clone())), + _ => None, + } + } } impl Layout for MoveNode { @@ -130,6 +138,13 @@ impl RotateNode { } .pack()) } + + fn field(&self, name: &str) -> Option<Value> { + match name { + "body" => Some(Value::Content(self.body.clone())), + _ => None, + } + } } impl Layout for RotateNode { @@ -209,6 +224,13 @@ impl ScaleNode { } .pack()) } + + fn field(&self, name: &str) -> Option<Value> { + match name { + "body" => Some(Value::Content(self.body.clone())), + _ => None, + } + } } impl Layout for ScaleNode { |
