Compare commits

...

1 Commits

Author SHA1 Message Date
Diego Imbert
38b362fb9d fix add flow node offset (stash) 2025-06-26 18:44:27 +02:00
2 changed files with 13 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
<script module lang="ts">
export let openedBottomBars: Record<string, true> = $state({})
</script>
<script lang="ts">
import Popover from '$lib/components/meltComponents/Popover.svelte'
import { twMerge } from 'tailwind-merge'
@@ -38,6 +42,11 @@
onEditInput
}: Props = $props()
$effect(() => {
if (bottomBarOpen) openedBottomBars[id] = true
else delete openedBottomBars[id]
})
const context = getContext<PropPickerContext>('PropPickerContext')
const flowPropPickerConfig = context?.flowPropPickerConfig
const MIN_WIDTH = 375

View File

@@ -7,6 +7,7 @@
import type { GraphEventHandlers } from '../../graphBuilder.svelte'
import { getStraightLinePath } from '../utils'
import { twMerge } from 'tailwind-merge'
import { openedBottomBars } from '$lib/components/flows/propPicker/OutputPicker.svelte'
const { useDataflow } = getContext<{
useDataflow: Writable<boolean | undefined>
@@ -55,9 +56,11 @@
? `${edgePath} ${getStraightLinePath({ sourceX, sourceY, targetY })}`
: edgePath
)
let yOffset = $derived(openedBottomBars?.[data.sourceId] ? 30 : 22)
</script>
<EdgeLabel x={sourceX} y={sourceY + 28} class="base-edge" style="">
<EdgeLabel x={sourceX} y={sourceY + yOffset} class="base-edge transition-transform">
{#if data?.insertable && !$useDataflow && !data?.moving}
<div
class={twMerge('edgeButtonContainer nodrag nopan top-0')}