cytoscape / cytoscape.js

Graph theory (network) library for visualisation and analysis
https://js.cytoscape.org
MIT License
10.09k stars 1.64k forks source link

Option to specify whether labels are included in overlap detection for layouts #1626

Closed maxkfranz closed 7 years ago

maxkfranz commented 7 years ago

Including labels can make the graph more spaced out than desired in some cases. Having an option would give more control over the output.

options.nodeDimensionsIncludeLabels : If true, the width of a node is considered to be node.boundingBox().w. If false, the width of a node is considered to be node.outerWidth(). The analogous cases for height also hold.

Uses node.layoutDimensions()

Ref https://github.com/cytoscape/cytoscape.js/pull/1784

d2fong commented 7 years ago

cose-bilkent in progress - https://github.com/cytoscape/cytoscape.js-cose-bilkent/pull/53