crubier / react-graph-vis

A react component to render nice graphs using vis.js
http://crubier.github.io/react-graph-vis/
MIT License
948 stars 170 forks source link

Window Resizing Issue #82

Closed zromick closed 4 years ago

zromick commented 4 years ago

When resizing the window , nodes often become oval and a trace of the image is left in some areas of the screen when dragging the nodes around (when going from a larger window view to a smaller window view).

I attempted to use resize-observer-polyfill to resize nodes appropriately based on window height and width, but I'm still getting this weird issue. Anyone know why?

zromick commented 4 years ago

Here's documentation I found on autoResizing:

Name Type Default Description
autoResize Boolean true If true, the Network will automatically detect when its container is resized, and redraw itself accordingly. If false, the Network can be forced to repaint after its container has been resized using the function redraw() and setSize().

Oddly, the default was not applied to my options and I needed to override them with autoResize: true. Closing the issue.