refit the cytoscape.js graph