diff options
Diffstat (limited to 'library/src/graphics')
| -rw-r--r-- | library/src/graphics/image.rs | 4 | ||||
| -rw-r--r-- | library/src/graphics/shape.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/library/src/graphics/image.rs b/library/src/graphics/image.rs index 5524e1c0..12121257 100644 --- a/library/src/graphics/image.rs +++ b/library/src/graphics/image.rs @@ -3,7 +3,7 @@ use std::ffi::OsStr; use typst::image::{Image, ImageFormat, RasterFormat, VectorFormat}; use crate::prelude::*; -use crate::text::TextNode; +use crate::text::LinkNode; /// Show a raster or vector graphic. #[derive(Debug, Hash)] @@ -90,7 +90,7 @@ impl LayoutInline for ImageNode { } // Apply link if it exists. - if let Some(url) = styles.get(TextNode::LINK) { + if let Some(url) = styles.get(LinkNode::DEST) { frame.link(url.clone()); } diff --git a/library/src/graphics/shape.rs b/library/src/graphics/shape.rs index e336c3a3..d484b993 100644 --- a/library/src/graphics/shape.rs +++ b/library/src/graphics/shape.rs @@ -1,7 +1,7 @@ use std::f64::consts::SQRT_2; use crate::prelude::*; -use crate::text::TextNode; +use crate::text::LinkNode; /// A sizable and fillable shape with optional content. #[derive(Debug, Hash)] @@ -161,7 +161,7 @@ impl<const S: ShapeKind> LayoutInline for ShapeNode<S> { } // Apply link if it exists. - if let Some(url) = styles.get(TextNode::LINK) { + if let Some(url) = styles.get(LinkNode::DEST) { frame.link(url.clone()); } |
