feat(svelte): add event handlers and props, rename class names

This commit is contained in:
moklick
2023-03-01 17:28:59 +01:00
parent 9391b36869
commit e2961bfa8c
38 changed files with 410 additions and 163 deletions
@@ -43,7 +43,7 @@
const nodeClassNameFunc = getAttrFunction(nodeClassName);
const shapeRendering =
typeof window === 'undefined' || !!window.chrome ? 'crispEdges' : 'geometricPrecision';
const labelledBy = `react-flow__minimap-desc-${$id}`;
const labelledBy = `svelte-flow__minimap-desc-${$id}`;
$: viewBB = {
x: -$transform[0] / $transform[2],
@@ -69,7 +69,7 @@
<Panel
{position}
class={cc(['react-flow__minimap', className])}
class={cc(['svelte-flow__minimap', className])}
style={`background-color: ${bgColor}; ${style}`}
>
<svg
@@ -100,7 +100,7 @@
{/if}
{/each}
<path
class="react-flow__minimap-mask"
class="svelte-flow__minimap-mask"
d={`M${x - offset},${y - offset}h${viewboxWidth + offset * 2}v${viewboxHeight + offset * 2}h${
-viewboxWidth - offset * 2
}z
@@ -19,7 +19,7 @@
</script>
<rect
class={cc(['react-flow__minimap-node', className])}
class={cc(['svelte-flow__minimap-node', className])}
{x}
{y}
rx={borderRadius}