-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Image nodes in network are square until interacted with #3203
Comments
Here’s a live example with a slightly larger graph on query.wikidata.org: http://tinyurl.com/yazbfwy8 – as soon as you click one of the nodes, all of the images correct their aspect ratio (so it’s not per-node – I forgot to mention that in the issue description). (Note that we might roll back to 4.19.1, which would break the live example. See T168714 for more information on what we’re doing about this bug.) |
Confirmed. I've seen this happen as well with SVG's. |
Analysis:
I've tried forcing the event, without success. I think the next thing to try is to force the resizing within the nodes until the images are there. I still have trouble fathoming why it's going wrong. Will keep you posted. |
OK, have a fix for this. Are you capable of patching it in the vis source? This would be the quickest way to fix the issue for you. |
I’m not sure if that’s possible, I’m not responsible for deployment – let’s ask @smalyshev :) |
The alternative is that I supply you with an interim version with a fix. Is that acceptable? You will have to wait till monday, though. |
Fix for almende#3203 Image nodes were assigned the default size on initialization, leading to very compressed images. This fix adjusts the default size as soon as the images used have been loaded. The approach for dealing with this has been adapted from `CircularImage`.
I've submitted a PR for this issue in the hope that it can be accepted for the release planned this weekend. This would avoid any problems with deployment on your side. Update: The fix made it into the next release, which is planned to go live this week. |
* Set dimensions properly of images on initialization. Fix for #3203 Image nodes were assigned the default size on initialization, leading to very compressed images. This fix adjusts the default size as soon as the images used have been loaded. The approach for dealing with this has been adapted from `CircularImage`. * Fixed tabs
Thanks, now I can confirm that the issue seems to be fixed. |
OK, great! You must have gotten a notification of the new release, TIL. |
No, just a notification that this issue was closed :) |
* Set dimensions properly of images on initialization. Fix for almende#3203 Image nodes were assigned the default size on initialization, leading to very compressed images. This fix adjusts the default size as soon as the images used have been loaded. The approach for dealing with this has been adapted from `CircularImage`. * Fixed tabs
After upgrading from vis 4.19.1 to 4.20.0, images in the network visualization are squeezed to square aspect ratio until the network is somehow interacted with, at which point they assume their correct aspect ratio. (Usually the switch happens as soon as you select a node, sometimes only upon deselection.)
We can reproduce this on Firefox and Chromium (both Ubuntu Xenial).
Small reproducer:
(Assumes that
vis
is innode_modules
; adjust the paths in<head>
if necessary.)Before interacting with the graph:
After selecting and deselecting the node:
From a quick glance over the release notes, #3010 sounds like it might be responsible for this.
The text was updated successfully, but these errors were encountered: