-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Network - Element Type Tooltip failing #2579
Comments
The documentation states:
So the following works out of the box:
At the moment, the |
Hi,
I my case my the benefit is that I am able to reuse a tooltip component common to the overall application.
It wouldn't be a great problem if I needed to recreate the tooltip component as a HTML string but it's obviously a cleaner solution if I can reuse existing software.
|
The docs say "String or Element". Looks like a bug to me! |
facing a issue where I pass Thanks! |
@Charlie-UK 👍 I got around to looking at this issue in-depth, and I must say your analysis is bloody excellent. Your suggestions are perfect and will hereby be PR'd. Thanks a million for this excellent work! |
@xyx2011 Wrt. to your question: I'm submitting a fix for the current issue, but I can't tell if that fixes your question. Would you mind making a separate issue for it, preferably with an example in |
**Note: ** This is a simple fix and should be easy to review. Fix for almende#2579 - Adjusted node title definition in `options.js` to allow DOM elements - Changed `BridgeObject()` in `util.js` so that DOM elements are *not* bridged.
**Note: ** This is a simple fix and should be easy to review. Fix for #2579 - Adjusted node title definition in `options.js` to allow DOM elements - Changed `BridgeObject()` in `util.js` so that DOM elements are *not* bridged.
**Note: ** This is a simple fix and should be easy to review. Fix for almende#2579 - Adjusted node title definition in `options.js` to allow DOM elements - Changed `BridgeObject()` in `util.js` so that DOM elements are *not* bridged.
Hi,
I've been working with vis network charts and have run into an issue trying to use an element as a tooltip (i.e. options.nodes.title = ).
This should show the issue occurring JsBin Example, I've attached a HTML file as an example as well as the console output seems different in JsBin (index.zip).
There seems to be a problem with the accepted options for nodes.title not being configured to accept dom elements which results in console error:
I fixed this locally by adding the "dom" type to the accepted types for nodes.title in "lib/network/options.js":
title: { string, dom, 'undefined': 'undefined' },
Secondly I encountered an issue on hovering over a node to display the tooltip which resulted in the console error:
Having followed the process through I believe this was a result of an issue in the "bridgeObject" function in "/lib/util.js". It seems like the following line is possibly inappropriate for Element type objects:
objectTo = Object.create(referenceObject)
I altered the function locally to be as below which seems to have fixed that issue:
I hope this is of some help, I don't know you code well so don't know if these changes are appropriate or if they might cause issues elsewhere. It could easily be that I am using the framework incorrectly in which case please let me know.
Great library btw, I have had good results from using it in a very short period of time.
The text was updated successfully, but these errors were encountered: