* refactor(core): allow setting handleId in useNodeConnections Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(core): deprecate useHandleConnections Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(examples): cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(docs): cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(core): cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(core): cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> * chore(docs): cleanup Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com> --------- Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
19 lines
509 B
Vue
19 lines
509 B
Vue
<script setup>
|
|
import { Handle, Position, useNodeConnections, useNodesData } from '@vue-flow/core'
|
|
|
|
const connections = useNodeConnections({
|
|
type: 'target',
|
|
})
|
|
|
|
const nodesData = useNodesData(() => connections.value[0]?.source)
|
|
</script>
|
|
|
|
<template>
|
|
<Handle
|
|
type="target"
|
|
:position="Position.Left"
|
|
:style="{ height: '16px', width: '6px', backgroundColor: nodesData.data?.color, filter: 'invert(100%)' }"
|
|
/>
|
|
{{ nodesData.data?.isGradient ? 'GRADIENT' : nodesData.data?.color }}
|
|
</template>
|