cytoscape/cytoscape.js-cola

Layout not respecting bounding box

crognale opened this issue · 3 comments

I have a 400x400 box, with some nodes fixed along the lefthand side (x=0) and some along the righthand side (x=400) by setting node.position in Cytoscape. However when I set the layout with cola, many of the remaining nodes end up outside the boundingBox I defined, and the viewport has to zoom out to accommodate them:
image

Setting a boundingBox doesn't seem to have any effect on the simulation as far as I can tell.

Things I have tried:

  • in layout{}, setting boundingBox{x1, y1, x2, y2}
  • Setting boundingBox{x1, y1, w, h}
  • Setting fit=false
  • Setting unconstrIter = 0
  • in Cytoscape config, setting zoomingEnabled = false
  • Using node.renderedPosition instead of node.position to fix lefthand and righthand nodes
stale commented

This issue has been automatically marked as stale, because it has not had activity within the past 30 days. It will be closed if no further activity occurs within the next 30 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.

@crognale have you found out how to make boundingBox option work?