feat(svelte): add selected prop for minimap node
This commit is contained in:
@@ -121,6 +121,7 @@
|
|||||||
y={pos.y}
|
y={pos.y}
|
||||||
width={node.width}
|
width={node.width}
|
||||||
height={node.height}
|
height={node.height}
|
||||||
|
selected={node.selected}
|
||||||
color={nodeColorFunc(node)}
|
color={nodeColorFunc(node)}
|
||||||
borderRadius={nodeBorderRadius}
|
borderRadius={nodeBorderRadius}
|
||||||
strokeColor={nodeStrokeColorFunc(node)}
|
strokeColor={nodeStrokeColorFunc(node)}
|
||||||
|
|||||||
@@ -10,12 +10,14 @@
|
|||||||
export let shapeRendering: string;
|
export let shapeRendering: string;
|
||||||
export let strokeColor: string;
|
export let strokeColor: string;
|
||||||
export let strokeWidth: number = 2;
|
export let strokeWidth: number = 2;
|
||||||
|
export let selected: boolean = false;
|
||||||
let className: string = '';
|
let className: string = '';
|
||||||
export { className as class };
|
export { className as class };
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<rect
|
<rect
|
||||||
class={cc(['svelte-flow__minimap-node', className])}
|
class={cc(['svelte-flow__minimap-node', className])}
|
||||||
|
class:selected
|
||||||
{x}
|
{x}
|
||||||
{y}
|
{y}
|
||||||
rx={borderRadius}
|
rx={borderRadius}
|
||||||
|
|||||||
Reference in New Issue
Block a user