johnnyflinn / ngCytoscape

Angular directive for cytoscape.js
http://johnnyflinn.github.io/ngCytoscape
MIT License
17 stars 18 forks source link

Default CoSe Layout Error #1

Closed johnnyflinn closed 8 years ago

johnnyflinn commented 8 years ago

Setting graph-layout="{name:'cose'"} causes Cannot read property 'length' of undefined error. This only seems to happen on initialization. Other layouts do not reproduce this error.

johnnyflinn commented 8 years ago

Removing newDefaults.layout = isDefined(userLayout) ? userLayout : {name:'grid'}; from graph defaults fixed issue. Initial layouts are now run after graph creation.