iVis-at-Bilkent / sbgnviz.js

A web based visualization tool for process description maps in SBGN
http://www.cs.bilkent.edu.tr/~ivis/SBGNViz_sample_app/
GNU Lesser General Public License v3.0
35 stars 14 forks source link

Do not define globals #174

Closed metincansiper closed 7 years ago

metincansiper commented 7 years ago

In SBGNViz global variables are defined. We need to remove them. We can only define 'window.cy' as a global variable.

metincansiper commented 7 years ago

Now the global reference defined is 'window.cy'

IgorRodchenkov commented 7 years ago

Great, but I would like to do something in order to remove that file (now it's cy-variables.js) completely or at least free ourselves from being forced to always place this line on the top, above all other script elements...

metincansiper commented 7 years ago

I think that we need to place that line before the libraries are included because these variables are used in Cytoscape.js (Unfortunately we needed this workaround to define new shapes). However, curently I am working on making SBGNViz a node.js application and then making it an npm module if it seems that it will meet our needs as an npm module. If it can be achieved, we will not need to include it in 'index.html'.