mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-21 08:03:33 +00:00
formatting
This commit is contained in:
@@ -361,8 +361,7 @@
|
||||
})
|
||||
|
||||
// Center horizontally
|
||||
const xCenter =
|
||||
(fullSize ? fullWidth : width) / 2 - bbox.width / 2 - (width - fullWidth) / 2
|
||||
const xCenter = (fullSize ? fullWidth : width) / 2 - bbox.width / 2 - (width - fullWidth) / 2
|
||||
const newNodes = nodes.map((n) => ({
|
||||
id: n.id,
|
||||
position: {
|
||||
@@ -926,7 +925,12 @@
|
||||
<SvelteFlowProvider>
|
||||
<ViewportResizer {height} {width} {nodes} bind:this={viewportResizer} />
|
||||
{#if moveManager}
|
||||
<DragCoordinator {moveManager} eventHandlers={eventHandler} {edges} nodes={nodesWithOffset} />
|
||||
<DragCoordinator
|
||||
{moveManager}
|
||||
eventHandlers={eventHandler}
|
||||
{edges}
|
||||
nodes={nodesWithOffset}
|
||||
/>
|
||||
{/if}
|
||||
{#if sharedViewport && onViewportChange}
|
||||
<ViewportSynchronizer
|
||||
@@ -990,8 +994,8 @@
|
||||
|
||||
{#if multiSelectEnabled}
|
||||
<SelectionBoundingBox
|
||||
selectedNodes={selectionManager.selectedIds.filter(id =>
|
||||
nodesWithOffset.some(n => n.id === id)
|
||||
selectedNodes={selectionManager.selectedIds.filter((id) =>
|
||||
nodesWithOffset.some((n) => n.id === id)
|
||||
)}
|
||||
allNodes={nodesWithOffset as (Node & { type: string })[]}
|
||||
onDeleteSelected={() => onDeleteMultiple?.(resolvedModuleIds)}
|
||||
@@ -1012,7 +1016,12 @@
|
||||
{@render leftHeader()}
|
||||
</div>
|
||||
{:else}
|
||||
<Controls position="top-right" orientation="horizontal" showLock={false} fitViewOptions={{ nodes: nodes.filter((n) => n.type !== 'note') }}>
|
||||
<Controls
|
||||
position="top-right"
|
||||
orientation="horizontal"
|
||||
showLock={false}
|
||||
fitViewOptions={{ nodes: nodes.filter((n) => n.type !== 'note') }}
|
||||
>
|
||||
{#if multiSelectEnabled}
|
||||
<div class="flex items-center gap-2">
|
||||
<Tooltip>
|
||||
|
||||
@@ -341,12 +341,9 @@ function layoutLevel(
|
||||
|
||||
if (isBranch) {
|
||||
// Place branches side by side horizontally
|
||||
branchWidths = branchLayouts.map((bl) =>
|
||||
Math.max(bl.bbox.width, constants.nodeWidth)
|
||||
)
|
||||
branchWidths = branchLayouts.map((bl) => Math.max(bl.bbox.width, constants.nodeWidth))
|
||||
const gaps = Math.max(0, branchWidths.length - 1) * constants.gapH
|
||||
totalWidth =
|
||||
branchWidths.reduce((s, w) => s + w, 0) + gaps
|
||||
totalWidth = branchWidths.reduce((s, w) => s + w, 0) + gaps
|
||||
wrapperWidth = Math.max(totalWidth, constants.nodeWidth)
|
||||
|
||||
maxBranchHeight = Math.max(0, ...branchLayouts.map((bl) => bl.bbox.height))
|
||||
|
||||
Reference in New Issue
Block a user