layerchart 1.0.2 → 1.0.3
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.
- package/dist/components/Area.svelte +1 -1
- package/dist/components/Link.svelte +3 -2
- package/dist/components/Spline.svelte +3 -2
- package/dist/components/TransformContext.svelte +4 -4
- package/dist/components/tooltip/TooltipContext.svelte +1 -1
- package/dist/utils/object.js +2 -0
- package/package.json +1 -1
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
return path(data ?? $contextData);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
const tweenedOptions = tweened
|
|
99
99
|
? { interpolate: interpolatePath, ...(typeof tweened === 'object' ? tweened : null) }
|
|
100
100
|
: false;
|
|
101
101
|
$: tweened_d = motionStore(defaultPathData(), { tweened: tweenedOptions });
|
|
@@ -65,8 +65,9 @@
|
|
|
65
65
|
$: markerEndId = markerEnd || $$slots['markerEnd'] ? uniqueId('marker-') : '';
|
|
66
66
|
|
|
67
67
|
export let tweened: boolean | Parameters<typeof tweenedStore>[1] = undefined;
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
const tweenedOptions = tweened
|
|
69
|
+
? { interpolate: interpolatePath, ...(typeof tweened === 'object' ? tweened : null) }
|
|
70
|
+
: false;
|
|
70
71
|
$: tweened_d = motionStore('', { tweened: tweenedOptions });
|
|
71
72
|
|
|
72
73
|
$: {
|
|
@@ -149,8 +149,9 @@
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
let d: string | null = '';
|
|
152
|
-
|
|
153
|
-
|
|
152
|
+
const tweenedOptions = tweened
|
|
153
|
+
? { interpolate: interpolatePath, ...(typeof tweened === 'object' ? tweened : null) }
|
|
154
|
+
: false;
|
|
154
155
|
$: tweened_d = motionStore(defaultPathData(), { tweened: tweenedOptions });
|
|
155
156
|
$: {
|
|
156
157
|
const path = $radial
|
|
@@ -130,15 +130,15 @@
|
|
|
130
130
|
center: { x: number; y: number },
|
|
131
131
|
rect?: { width: number; height: number }
|
|
132
132
|
) {
|
|
133
|
-
|
|
133
|
+
const newScale = rect ? ($width < $height ? $width / rect.width : $height / rect.height) : 1;
|
|
134
134
|
|
|
135
135
|
$translate = {
|
|
136
|
-
x: $width / 2 - center.x,
|
|
137
|
-
y: $height / 2 - center.y,
|
|
136
|
+
x: $width / 2 - center.x * newScale,
|
|
137
|
+
y: $height / 2 - center.y * newScale,
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
if (rect) {
|
|
141
|
-
$scale =
|
|
141
|
+
$scale = newScale;
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
144
|
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
const point = localPoint(e, containerNode);
|
|
193
193
|
|
|
194
194
|
if (
|
|
195
|
-
tooltipData
|
|
195
|
+
tooltipData == null && // mode !== 'manual' but support annotations
|
|
196
196
|
(point.x < tooltipContextNode.offsetLeft ||
|
|
197
197
|
point.x > tooltipContextNode.offsetLeft + tooltipContextNode.offsetWidth ||
|
|
198
198
|
point.y < tooltipContextNode.offsetTop ||
|