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

Uninitialized cy variable #13

Closed tvoloshyn closed 7 years ago

tvoloshyn commented 7 years ago

Hi guys,

I'm getting an error, while trying to include this plugin, registered with "Plain JS" method.

The problem is at line 1025 (probably somewhere else as well). https://github.com/iVis-at-Bilkent/cytoscape.js-grid-guide/commit/6fe4bfed49584f9ddfc9c920ed4ae88299cf2892

Uncaught ReferenceError: cy is not defined

I've added a temporary fix by assigning window.cy to an instance of cytoscape, but I'd say it has to be changed inside the plugin itself, as not everyone is assigning cytoscape to a windowobject directly.

Thanks

metincansiper commented 7 years ago

Thanks @tvoloshyn for identifying the problem. I fixed that problem. If your problem is solved we can close the issue.