Skip to content

Commit

Permalink
fix: missing node id in node components/slots
Browse files Browse the repository at this point in the history
  • Loading branch information
bcakmakoglu committed Oct 22, 2021
1 parent ee07aff commit cb96b1a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/UpdatableEdge/UpdatableEdgeExample.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const initialElements: Elements = [
position: { x: 400, y: 100 },
style: { background: '#D6D5E6', color: '#333', border: '1px solid #222138', width: 180 },
},
{ id: 'e1-2', source: '1', target: '2', label: 'This is a draggable edge' },
{ id: 'e1-2', source: '1', target: '2', label: 'Updateable edge' },
] as Elements
const elements = ref(initialElements)
Expand Down
2 changes: 1 addition & 1 deletion src/components/Nodes/DefaultNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Handle from '~/components/Handle/Handle.vue'
import { NodeProps, Position } from '~/types'
interface DefaultNodeProps {
interface DefaultNodeProps extends NodeProps {
data?: NodeProps['data']
connectable?: NodeProps['connectable']
targetPosition?: NodeProps['targetPosition']
Expand Down
2 changes: 1 addition & 1 deletion src/components/Nodes/InputNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Handle from '~/components/Handle/Handle.vue'
import { NodeProps, Position } from '~/types'
interface InputNodeProps {
interface InputNodeProps extends NodeProps {
data?: NodeProps['data']
connectable?: NodeProps['connectable']
sourcePosition?: NodeProps['sourcePosition']
Expand Down
2 changes: 2 additions & 0 deletions src/components/Nodes/Node.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ watch(
>
<slot
v-bind="{
id: props.node.id,
data: props.node.data,
type: props.node.type,
xPos: props.node.__rf.position.x,
Expand All @@ -193,6 +194,7 @@ watch(
<component
:is="props.type"
v-bind="{
id: props.node.id,
data: props.node.data,
type: props.node.type,
xPos: props.node.__rf.position.x,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Nodes/OutputNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Handle from '~/components/Handle/Handle.vue'
import { NodeProps, Position } from '~/types'
interface OutputNodeProps {
interface OutputNodeProps extends NodeProps {
data?: NodeProps['data']
connectable?: NodeProps['connectable']
targetPosition?: NodeProps['targetPosition']
Expand Down

1 comment on commit cb96b1a

@vercel
Copy link

@vercel vercel bot commented on cb96b1a Oct 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.