Skip to content
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

Added hover events to Edges. #354

Merged
merged 3 commits into from
Jun 22, 2023

Conversation

justinmccann14
Copy link
Contributor

@justinmccann14 justinmccann14 commented May 12, 2023

-Added a new prop to allow edges to be highlighted when hovering over them (similar to when a click listener is specified)
-Pass a new hovering prop into the slot to be able to know when that edge is being hovered over

This feature solves a particular use case we have where we want to show a custom label only when hovering over the edges. I assume this would be useful to others as well for a multitude of other reasons.

This project is awesome so I am just looking at some small ways I can try and give back!

Ex:

<Edge let:path let:hovering animate={true} enableHover={true}>
	<path d={path} />
	<div class="label {hovering ? 'visible' : 'hidden'}" slot="label">
		<h2>Title</h2>
		<p>This is some sample content!</p>
		<p>This is some more sample content!!</p>
	</div>
</Edge>
Screen.Recording.2023-05-12.at.3.28.06.PM.mov

@justinmccann14
Copy link
Contributor Author

@briangregoryholmes Any updates on the status of this? I saw version 8 was released. Nice job!

@briangregoryholmes
Copy link
Contributor

Hey, Justin. This will for sure be approved. Thanks so much for resolving the conflicts and updating the documentation. I'm hoping to have some time this weekend to go through all the outstanding PRs.

@briangregoryholmes briangregoryholmes merged commit a843900 into open-source-labs:main Jun 22, 2023
@justinmccann14 justinmccann14 deleted the edge_hover_events branch June 28, 2023 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants