svelteplot 0.4.1-pr-181.0 → 0.4.1-pr-182.0
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/helpers/resolve.js
CHANGED
|
@@ -128,7 +128,9 @@ export function resolveStyles(plot, datum, channels, defaultColorProp = null, us
|
|
|
128
128
|
...getBaseStylesObject(datum?.datum, channels),
|
|
129
129
|
fill: 'none',
|
|
130
130
|
stroke: 'none',
|
|
131
|
-
...(defaultColorProp &&
|
|
131
|
+
...(defaultColorProp &&
|
|
132
|
+
(channels[oppositeColor[defaultColorProp]] == null ||
|
|
133
|
+
channels[oppositeColor[defaultColorProp]] === 'none')
|
|
132
134
|
? { [defaultColorProp]: 'currentColor' }
|
|
133
135
|
: {}),
|
|
134
136
|
...Object.fromEntries(Object.entries(scaledStyleProps)
|
|
@@ -147,6 +149,9 @@ export function resolveStyles(plot, datum, channels, defaultColorProp = null, us
|
|
|
147
149
|
return [cssAttr, plot.options.color.unknown];
|
|
148
150
|
}
|
|
149
151
|
}
|
|
152
|
+
else if ((key === 'fill' || key === 'stroke') && value === true) {
|
|
153
|
+
return [cssAttr, 'currentColor'];
|
|
154
|
+
}
|
|
150
155
|
return [cssAttr, value];
|
|
151
156
|
}))
|
|
152
157
|
};
|
package/dist/marks/Frame.svelte
CHANGED
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
let markProps: FrameMarkProps = $props();
|
|
36
36
|
|
|
37
37
|
const DEFAULTS: FrameMarkProps = {
|
|
38
|
-
fill:
|
|
38
|
+
fill: undefined,
|
|
39
39
|
class: 'frame',
|
|
40
|
-
stroke:
|
|
40
|
+
stroke: undefined,
|
|
41
41
|
fillOpacity: 1,
|
|
42
42
|
strokeOpacity: 1,
|
|
43
43
|
...getContext<PlotDefaults>('svelteplot/_defaults').frame
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
width={plot.facetWidth}
|
|
75
75
|
height={plot.facetHeight}
|
|
76
76
|
{usedScales}
|
|
77
|
-
fallbackStyle=
|
|
77
|
+
fallbackStyle={fill == null || fill === 'none' ? 'stroke' : 'fill'}
|
|
78
78
|
options={{ ...options, fill, stroke, fillOpacity, opacity, strokeOpacity }} />
|
|
79
79
|
{/snippet}
|
|
80
80
|
</Mark>
|