minor refactor re  #785
minor refactor re  #785

KonstantinShemyak/cytoscape.js,KonstantinShemyak/cytoscape.js,rlugojr/cytoscape.js,soomin-maeng/cytoscape.js,soomin-maeng/cytoscape.js,rlugojr/cytoscape.js