cytoscape/cytoscape.js-spread

The boundingBox has no effect

Closed this issue · 1 comments

Scenario
switch layout in selected elements.
I tested breadthfirst/circle/concentric/cose/grid/random and spread, only spread refreshed the layout of whole graph.

Bug
It looks like that the boundingBox option is not working.

Code

var elements = cy.$(':selected'); 
var layout = cyLayoutOptions[layoutName];
layout.boundingBox = elements.boundingBox();

var tmp = elements.layout(cyLayoutOptions[layoutName]);
tmp.run();

Screenshot
spread-layout-boundingBox-not-work

Refer to the readme re. layout phases.