-
-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add arrows to edges #472
Comments
Yes it's possible to use the I used this code to manually add arrows to edge: <Edge let:path>
<defs>
<!-- A marker to be used as an arrowhead -->
<marker
id="arrow"
viewBox="0 0 10 10"
refX="11"
refY="5"
markerWidth="6"
markerHeight="6"
orient="auto-start-reverse"
>
<path d="M 0 0 L 10 5 L 0 10 z" />
</marker>
</defs>
<path
d={path}
marker-start={isBidirectional ? 'url(#arrow)' : ''}
marker-end="url(#arrow)"
/>
</Edge> Note: in this example, I don't know if such a feature will find its way in Svelvet. In the meantime, I hope this example could be useful to someone ;) |
Hello, thanks for the excellent library! 👋
I was wondering if it might be possible to add (optional) arrows to edges. Arrows can be great when implementing flow charts or indicating parent-child hierarchies.
The arrows should definitely be optional. They aren't the right thing for many use cases!
Perhaps it would be possible to define
marker-end
components and pass them into the edge, similar to how anchors are added to nodes.There's some previous discussion about arrows here: #460.
The text was updated successfully, but these errors were encountered: