From 87bdf8575c253161f428bebc785e88c8f16c7a76 Mon Sep 17 00:00:00 2001 From: "Yuichiro Tachibana (Tsuchiya)" Date: Mon, 3 Mar 2025 23:49:35 +0800 Subject: [PATCH 1/3] Add sample of contents on the arrows --- slides.md | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/slides.md b/slides.md index b2389a0..e0d87ae 100644 --- a/slides.md +++ b/slides.md @@ -261,6 +261,49 @@ Use `pos1` and `pos2` to specify the anchor point on the snapped elements. +--- + +# Content on the arrow + + + Hello + + + + Ahoy + + + + Hello + + + + Slidev logo + + + +
+ +```html + + Hello + + + + Ahoy + + + + Hello + + + + Slidev logo + + +``` + +
--- From 354c07dafe4c905719d4301413edbeb9b0e0fc9a Mon Sep 17 00:00:00 2001 From: "Yuichiro Tachibana (Tsuchiya)" Date: Mon, 3 Mar 2025 23:50:01 +0800 Subject: [PATCH 2/3] Fix straight arrows to show the child contents --- components/use-rough-arrow.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/use-rough-arrow.ts b/components/use-rough-arrow.ts index 9946f77..914f750 100644 --- a/components/use-rough-arrow.ts +++ b/components/use-rough-arrow.ts @@ -107,6 +107,10 @@ export function useRoughArrow(props: { angle1: angle, angle2: angle, lineLength: Math.hypot(point2.x - point1.x, point2.y - point1.y), + arcMid: { + x: (point1.x + point2.x) / 2, + y: (point1.y + point2.y) / 2, + }, }; } From 30c35ca1b9d1e48c0cbf54cc7c68677d9d6d6f95 Mon Sep 17 00:00:00 2001 From: "Yuichiro Tachibana (Tsuchiya)" Date: Mon, 3 Mar 2025 23:50:36 +0800 Subject: [PATCH 3/3] Add changeset --- .changeset/witty-seals-punch.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/witty-seals-punch.md diff --git a/.changeset/witty-seals-punch.md b/.changeset/witty-seals-punch.md new file mode 100644 index 0000000..bf4d292 --- /dev/null +++ b/.changeset/witty-seals-punch.md @@ -0,0 +1,5 @@ +--- +"slidev-addon-fancy-arrow": patch +--- + +Fix to display the contents on straight arrows