diff options
Diffstat (limited to 'library/src/visualize/shape.rs')
| -rw-r--r-- | library/src/visualize/shape.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/library/src/visualize/shape.rs b/library/src/visualize/shape.rs index 5edab70b..d1ced9cd 100644 --- a/library/src/visualize/shape.rs +++ b/library/src/visualize/shape.rs @@ -94,6 +94,16 @@ impl<const S: ShapeKind> ShapeNode<S> { styles.set_opt(Self::RADIUS, args.named("radius")?); } } + + fn field(&self, name: &str) -> Option<Value> { + match name { + "body" => match &self.0 { + Some(body) => Some(Value::Content(body.clone())), + None => Some(Value::None), + }, + _ => None, + } + } } impl<const S: ShapeKind> Layout for ShapeNode<S> { |
