-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Network: HTML formatted text in nodes disappears after setting new options #3047
Comments
After some intensive debugging, I discovered that in the internal representation, field The next step is to discover why this happens. But I suppose that a check can be placed in the draw location (ref: In any case: confirmed. |
I can trace the problem all the way down to the missing of the I'm sorry to report I have no easy fix for this. The problem is simple but sorting out how to fix it is non-trivial. The best fix I can offer you, is to re-pass the option definitions when you call Unless you got vis.js from the repo and built it yourself, of course. In that case, I can give you a simple two-line fix for this. |
According to the doc
This would be in essence the issue here. It does not default to that value. |
Thanks again for your quick response :) What do you mean by
Do you mean passing the whole options object with the changed values or do i have to pass something in addition? Regards, Steff |
I've figured out a fix. Will make a PR soon. |
Yes, that's what I meant. But I tried to verify this and, unfortunately, it doesn't work. The only way to get this working properly is to fix some code ( |
Thanks again :) I will wait for the release and use my workaround until then. |
Hello,
i recently faced a problem while using the VisJS library. I created a network with some nodes that have HTML formatted text (bold and italic). That works fine so far, but when i change the options - e.g. to switch the direction of the network - the formatted part of the text dissapears.
I have setted up an example on jsfiddle.
The only workaround i found was calling the location.reload() method. But this only works if the options can be saved before the reload. In my case this works because i am using the library for a Vaadin addon which keeps the state inside a java object. If somebody knows a better solution i would be very pleased :). Reloading the whole page works this way but may be confusing to the user.
Thanks in advanced.
Regrads,
Steff
The text was updated successfully, but these errors were encountered: