fix(svelte) changed attribute names of className to class in MiniMap & Background plugins

This commit is contained in:
Peter
2023-09-18 17:36:53 +02:00
parent 00ee83f960
commit f4e9d9ad4c
4 changed files with 8 additions and 8 deletions
@@ -21,7 +21,7 @@
export let ariaLabel: $$Props['ariaLabel'] = 'Mini map';
export let nodeStrokeColor: $$Props['nodeStrokeColor'] = 'transparent';
export let nodeColor: $$Props['nodeColor'] = '#e2e2e2';
export let nodeClassName: $$Props['nodeClassName'] = '';
export let nodeClass: $$Props['nodeClass'] = '';
export let nodeBorderRadius: $$Props['nodeBorderRadius'] = 5;
export let nodeStrokeWidth: $$Props['nodeStrokeWidth'] = 2;
export let bgColor: $$Props['bgColor'] = undefined;
@@ -53,7 +53,7 @@
const nodeColorFunc = getAttrFunction(nodeColor);
const nodeStrokeColorFunc = getAttrFunction(nodeStrokeColor);
const nodeClassNameFunc = getAttrFunction(nodeClassName);
const nodeClassFunc = getAttrFunction(nodeClass);
const shapeRendering =
typeof window === 'undefined' || !!window.chrome ? 'crispEdges' : 'geometricPrecision';
const labelledBy = `svelte-flow__minimap-desc-${$flowId}`;
@@ -126,7 +126,7 @@
strokeColor={nodeStrokeColorFunc(node)}
strokeWidth={nodeStrokeWidth}
{shapeRendering}
class={nodeClassNameFunc(node)}
class={nodeClassFunc(node)}
/>
{/if}
{/each}
@@ -8,7 +8,7 @@ export type MiniMapProps = {
bgColor?: string;
nodeColor?: string | GetMiniMapNodeAttribute;
nodeStrokeColor?: string | GetMiniMapNodeAttribute;
nodeClassName?: string | GetMiniMapNodeAttribute;
nodeClass?: string | GetMiniMapNodeAttribute;
nodeBorderRadius?: number;
nodeStrokeWidth?: number;
maskColor?: string;