diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-02-12 18:58:39 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-02-12 19:57:28 +0100 |
| commit | 3ffa7393f0632d9ee5dd9c821685a1a033d5c0ab (patch) | |
| tree | af09b0683352c4028436a2e5251dce54cf41d4aa /src/doc.rs | |
| parent | f4856c18b9cf3f6952276cc61b557aebeb2fa651 (diff) | |
Make all nodes block-level
Diffstat (limited to 'src/doc.rs')
| -rw-r--r-- | src/doc.rs | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -267,6 +267,10 @@ impl Frame { /// Attach the metadata from this style chain to the frame. pub fn meta(&mut self, styles: StyleChain) { for meta in styles.get(Meta::DATA) { + if matches!(meta, Meta::Hidden) { + self.clear(); + break; + } self.push(Point::zero(), Element::Meta(meta, self.size)); } } @@ -533,6 +537,8 @@ pub enum Meta { /// An identifiable piece of content that produces something within the /// area this metadata is attached to. Node(StableId, Content), + /// Indicates that the content is hidden. + Hidden, } #[node] |
