Skip to content

Handle positioning #55

Answered by bcakmakoglu
nobilik asked this question in Q&A
Discussion options

You must be logged in to vote

You are always welcome to ask as many question as you want 😄

You can change handle positions, check the custom-node example:

<script lang="ts" setup>
import { CSSProperties } from 'vue'
import { Handle, Position, Connection, Edge, NodeProps } from '@braks/vue-flow'

interface ColorSelectorNodeProps extends NodeProps {
  data: {
    color: string
    onChange: (event: any) => void
  }
}
const props = defineProps<ColorSelectorNodeProps>()

// here we overwrite or add styles to the handle
const targetHandleStyle: CSSProperties = { background: '#555' }
const sourceHandleStyleA: CSSProperties = { ...targetHandleStyle, top: '10px' }
const sourceHandleStyleB: CSSProperties = { ...targetHandleStyle

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nobilik
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
2 participants
Converted from issue

This discussion was converted from issue #54 on March 30, 2022 15:20.