SvelteFlow Dynamic EdgeMarkers #3990
-
Hello! First I wanted to say this is a really cool project and I've enjoyed working with it and seeing what it can do. My question is about adding a basic MarkerType.Arrow to a custom edge via the I have read the documentation
However, (and I think a lot of the SvelteFlow documentation suffers from this), there aren't any examples of dynamically creating edges with a markerEnd. - i.e. When a user creates a new edge. For example, in the Custom Edges example. All of the data is hard coded in a ts file. If you delete and re-apply the edge, the I have something like this. However, I don't see how I can set this <script>
// .... custom edge props
export let markerEnd // <-- Always undefined on new edge
</script>
<BaseEdge path={edgePath} {markerEnd} />
<EdgeLabelRenderer>
<!-- Custom stuff -->
</EdgeLabelRenderer> |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For my use-case I believe I found an answer. - Passing |
Beta Was this translation helpful? Give feedback.
For my use-case I believe I found an answer. - Passing
defaultEdgeOptions={{markerEnd: { type: MarkerType.Arrow }}}
toSvelteFlow
.