Skip to content

Commit

Permalink
Bug fix on applying tiling to single nodes
Browse files Browse the repository at this point in the history
if packing is enabled
  • Loading branch information
hasanbalci committed Oct 3, 2019
1 parent 0d95400 commit dc386bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
11 changes: 2 additions & 9 deletions cytoscape-fcose.js
Original file line number Diff line number Diff line change
Expand Up @@ -604,15 +604,8 @@ var Layout = function () {
}
}
components.forEach(function (component, index) {
if (options.tile) {
if (!(component.edges().length == 0 && toBeTiledNodes.length == 1)) {
options.eles = component;
coseResult.push(coseLayout(options, spectralResult[index]));
}
} else {
options.eles = component;
coseResult.push(coseLayout(options, spectralResult[index]));
}
options.eles = component;
coseResult.push(coseLayout(options, spectralResult[index]));
});
}
} else {
Expand Down
12 changes: 2 additions & 10 deletions src/fcose/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,8 @@ class Layout {
}
}
components.forEach(function(component, index){
if(options.tile){
if(!(component.edges().length == 0 && toBeTiledNodes.length == 1)){
options.eles = component;
coseResult.push(coseLayout(options, spectralResult[index]));
}
}
else{
options.eles = component;
coseResult.push(coseLayout(options, spectralResult[index]));
}
options.eles = component;
coseResult.push(coseLayout(options, spectralResult[index]));
});
}
}
Expand Down

0 comments on commit dc386bb

Please sign in to comment.