feat(nodes): add store id as class to handles

* for better identification, add a class to handle according to the current store id

Signed-off-by: Braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
Braks
2021-12-20 19:29:52 +01:00
parent 74c30376a5
commit 9c1f04426e
2 changed files with 7 additions and 7 deletions
+3 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts" setup>
import { useHandle } from '../../composables'
import { useHandle, useStore } from '../../composables'
import { Position, ValidConnectionFunc } from '../../types'
import { NodeId } from '../../context'
@@ -11,6 +11,7 @@ interface HandleProps {
connectable?: boolean
}
const store = useStore()
const props = withDefaults(defineProps<HandleProps>(), {
id: '',
type: 'source',
@@ -37,6 +38,7 @@ export default {
:class="[
'vue-flow__handle',
`vue-flow__handle-${props.position}`,
`vue-flow__handle-${store.id}`,
'nodrag',
{
source: props.type !== 'target',