Skip to content

Commit

Permalink
refactor(core): use v-bind to pass connection line props
Browse files Browse the repository at this point in the history
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
  • Loading branch information
bcakmakoglu committed Feb 11, 2023
1 parent 03edd46 commit ea0696c
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions packages/core/src/components/ConnectionLine/ConnectionLine.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,17 +101,19 @@ export default {
<component
:is="connectionLineComponent"
v-if="connectionLineComponent"
:source-x="sourceX"
:source-y="sourceY"
:source-position="fromPosition"
:targetX="targetX"
:targetY="targetY"
:target-position="targetPosition"
:source-node="sourceNode"
:source-handle="sourceHandle"
:marker-end="`url(#${getMarkerId(connectionLineOptions.markerEnd)})`"
:marker-start="`url(#${getMarkerId(connectionLineOptions.markerStart)})`"
:connection-status="connectionStatus"
v-bind="{
sourceX,
sourceY,
sourcePosition: sourceHandle?.position,
targetX,
targetY,
targetPosition,
sourceNode,
sourceHandle,
markerEnd: `url(#${getMarkerId(connectionLineOptions.markerEnd)})`,
markerStart: `url(#${getMarkerId(connectionLineOptions.markerStart)})`,
connectionStatus,
}"
/>

<path
Expand Down

2 comments on commit ea0696c

@vercel
Copy link

@vercel vercel bot commented on ea0696c Feb 11, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on ea0696c Feb 11, 2023

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.