Skip to content

Commit

Permalink
fix(Spline): Remove transfering classes to <canvas> (after removing f…
Browse files Browse the repository at this point in the history
…rom `renderPathData()`)
  • Loading branch information
techniq committed Dec 15, 2024
1 parent ed9603b commit 1b39ee9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/layerchart/src/lib/components/Spline.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@
containerWidth: $containerWidth,
containerHeight: $containerHeight,
});
// Transfer classes defined on <Spline> to <canvas> to enable window.getComputedStyle() retrieval (Tailwind classes, etc)
if ($$props.class) {
$canvasCtx.canvas.classList.add(...$$props.class.split(' '));
}
// TODO: Support `draw`
renderPathData($canvasCtx, $tweened_d, { class: $$props.class });
}
Expand Down

0 comments on commit 1b39ee9

Please sign in to comment.