mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-28 00:02:42 +00:00
fix add flow node offset (stash)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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')}
|
||||
|
||||
Reference in New Issue
Block a user