layerchart 0.58.0 → 0.58.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -90,10 +90,17 @@
90
90
  $: xOffset = isScaleBand($xScale) ? $xScale.bandwidth() / 2 : 0;
91
91
  $: yOffset = isScaleBand($yScale) ? $yScale.bandwidth() / 2 : 0;
92
92
 
93
+ /** Provide initial `0` horizontal baseline and initially hide/untrack scale changes so not reactive (only set on initial mount) */
94
+ function defaultPathData() {
95
+ const [xRangeMin, xRangeMax] = $xScale.range();
96
+ const yRangeZero = $yScale(0);
97
+ return `M${xRangeMin},${yRangeZero} L${xRangeMax},${yRangeZero}`;
98
+ }
99
+
93
100
  let d: string | null = '';
94
101
  // @ts-expect-error
95
102
  $: tweenedOptions = tweened ? { interpolate: interpolatePath, ...tweened } : false;
96
- $: tweened_d = motionStore('', { tweened: tweenedOptions });
103
+ $: tweened_d = motionStore(defaultPathData(), { tweened: tweenedOptions });
97
104
  $: {
98
105
  const path = $radial
99
106
  ? lineRadial()
@@ -160,7 +160,7 @@
160
160
 
161
161
  {#if $tooltip.data}
162
162
  <div
163
- class={cls('absolute pointer-events-none z-50', classes.root)}
163
+ class={cls('absolute pointer-events-none z-50 select-none', classes.root)}
164
164
  style:top="{$yPos}px"
165
165
  style:left="{$xPos}px"
166
166
  transition:fade={{ duration: 100 }}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "author": "Sean Lynch <techniq35@gmail.com>",
5
5
  "license": "MIT",
6
6
  "repository": "techniq/layerchart",
7
- "version": "0.58.0",
7
+ "version": "0.58.2",
8
8
  "devDependencies": {
9
9
  "@changesets/cli": "^2.27.9",
10
10
  "@mdi/js": "^7.4.47",