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

Allow HTML content as node label #21

Closed
antiguru opened this issue Oct 15, 2012 · 2 comments
Closed

Allow HTML content as node label #21

antiguru opened this issue Oct 15, 2012 · 2 comments

Comments

@antiguru
Copy link

Hi there-
First of all, I would like to thank you for providing this library, it just fits my needs perfectly! Switching to dagre from a not-so-complete d3 layout took less than an hour!

In order to support actions when clicking on nodes it would be great if I could attach html content or a callback function to nodes, something like:

dagre.nodeOnClick(myCallback);
// later:
function myCallback(target) {...}

Allowing HTML content in the SVG could be used to provide the same functionality.

Thanks a lot,
Moritz

@antiguru
Copy link
Author

Duplicate of #19.

@cpettitt
Copy link
Collaborator

As you saw, @robopeter recently submitted a patch with HTML support. I've updated the hosted demo to include his patch. Here's a quick example with an onclick handler.

His patch currently resides on the v0.0.3 branch. I plan to get this merged to master and published sometime this week.

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

No branches or pull requests

2 participants