Skip to content

Commit

Permalink
fix(Highlight): Fix Svelte 3/4 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
techniq committed Feb 10, 2025
1 parent 03e731b commit 1107a7d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/breezy-elephants-grab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'layerchart': patch
---

fix(Highlight): Fix Svelte 3/4 compat
5 changes: 3 additions & 2 deletions packages/layerchart/src/lib/components/Highlight.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import { isScaleBand } from '$lib/utils/scales.js';
import { accessor, type Accessor } from '$lib/utils/common.js';
import { asAny } from '$lib/utils/types.js';
const {
data: contextData,
Expand Down Expand Up @@ -424,14 +425,14 @@
onpointerenter={onpointenter &&
((e) => {
if (onpointclick) {
(e.target as HTMLElement | SVGElement).style.cursor = 'pointer';
asAny(e.target).style.cursor = 'pointer';
}
onpointenter(e, { point, data: highlightData });
})}
onpointerleave={onpointleave &&
((e) => {
if (onpointclick) {
(e.target as HTMLElement | SVGElement).style.cursor = 'default';
asAny(e.target).style.cursor = 'default';
}
onpointleave(e, { point, data: highlightData });
})}
Expand Down

0 comments on commit 1107a7d

Please sign in to comment.