summaryrefslogtreecommitdiff
path: root/library/src/graphics
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2022-11-21 14:09:30 +0100
committerLaurenz <laurmaedje@gmail.com>2022-11-21 14:09:30 +0100
commitfd7b9d9e1eb8eef60c20e65dfc946c4424f02c8f (patch)
treeb650dd73e70fd98b5166a6db657570aa9035ac92 /library/src/graphics
parent36ea0b05c9986288eec8bc4a6b35a89b6ea0d3f4 (diff)
Move destination property from text to link
Diffstat (limited to 'library/src/graphics')
-rw-r--r--library/src/graphics/image.rs4
-rw-r--r--library/src/graphics/shape.rs4
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());
}