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
58 stars 9 forks source link

Canvas isn't resized on browser resizing #14

Closed SebastianOpriel closed 7 years ago

SebastianOpriel commented 7 years ago

Hello,

grid-guide creates two additional canvas elements above of the cytoscape.js canvas elements. One of the both elements doesn't have any attributes, the other got an absolute position, top, left and z-index attributes. So far, no problem. When the browser is resized and due to the layout, several HTML elements wrap, top and left attributes aren't updated like they were on other canvas elements from other cytoscape plugins. This results in a problematically layout where you may drag and drop the canvas outside of the borders of the desired area. Additionally node's touchpoints are postponed.

Before resizing: before

After resizing: after

kinimesi commented 7 years ago

Hi @bastianleirpo I think the problem is fixed now. Can you verify and close the issue? Thanks.

SebastianOpriel commented 7 years ago

Hey @kinimesi, yes it fixed it. You might remove the console.log output on resizeing.