iVis-at-Bilkent / cytoscape.js-grid-guide

A Cytsocape.js extension to provide a framework for grid interactions such as grid lines and snapping to grid, and guidelines and snap support for alignment of nodes.
MIT License
59 stars 9 forks source link

How to force a grid resize/rerender #45

Closed sikula closed 4 years ago

sikula commented 4 years ago

I'm using this library with ReactJS and my page has the cytoscape graph in the mainview, and a sliding panel on the right. When the panel is closed, I would like the grid to re-calculate the size and update. Is there a way to force the grid to resize?

sikula commented 4 years ago

Just to be clear, the canvas does resize when the window size changes, but not when the size of the parent container changes

hasanbalci commented 4 years ago

@sikula This must be fixed in the unstable branch. Can you please verify that it works now? We will make a new release soon if it is ok.

sikula commented 4 years ago

That worked! Thank so much