minimize inline style usage
This commit is contained in:
@@ -58,8 +58,8 @@
|
||||
panOnDrag = true,
|
||||
selectionOnDrag = true,
|
||||
connectionLineComponent,
|
||||
connectionLineStyle = '',
|
||||
connectionLineContainerStyle = '',
|
||||
connectionLineStyle,
|
||||
connectionLineContainerStyle,
|
||||
connectionLineType = ConnectionLineType.Bezier,
|
||||
attributionPosition,
|
||||
children,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import type { HTMLAttributes } from 'svelte/elements';
|
||||
import type { Snippet } from 'svelte';
|
||||
import { type SvelteFlowRestProps } from '$lib/store/types';
|
||||
import { toPxString } from '$lib/utils';
|
||||
|
||||
let {
|
||||
width,
|
||||
@@ -87,8 +88,8 @@
|
||||
bind:this={domNode}
|
||||
bind:clientHeight
|
||||
bind:clientWidth
|
||||
style:width
|
||||
style:height
|
||||
style:width={toPxString(width)}
|
||||
style:height={toPxString(height)}
|
||||
class={['svelte-flow', 'svelte-flow-container', className, colorMode]}
|
||||
data-testid="svelte-flow__wrapper"
|
||||
role="application"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<div
|
||||
class="svelte-flow__viewport xyflow__viewport svelte-flow__container"
|
||||
style="transform: translate({store.viewport.x}px, {store.viewport.y}px) scale({store.viewport
|
||||
style:transform="translate({store.viewport.x}px, {store.viewport.y}px) scale({store.viewport
|
||||
.zoom})"
|
||||
>
|
||||
{@render children()}
|
||||
|
||||
Reference in New Issue
Block a user