webtreemap icon indicating copy to clipboard operation
webtreemap copied to clipboard

Show tooltip when hovering node

Open nikolay-borzov opened this issue 6 years ago • 3 comments

Useful when node is too small to fit caption

nikolay-borzov avatar May 12 '19 12:05 nikolay-borzov

Good idea! Might be as simple as adding a title attribute on the DOM node.

evmar avatar May 12 '19 16:05 evmar

I believe the first version has it. But It would be great to provide a hook method where a user can attach custom behaviour to node element (e.g. add multiline tooltip)

nikolay-borzov avatar May 12 '19 16:05 nikolay-borzov

I guess it would go somewhere around here:

https://github.com/evmar/webtreemap/blob/master/src/treemap.ts#L115

I experimented with letting the user provide a function here, I can't remember why I removed it.

evmar avatar May 12 '19 17:05 evmar