elk icon indicating copy to clipboard operation
elk copied to clipboard

rectpacking: Add rectpacking improvement.

Open soerendomroes opened this issue 3 years ago • 1 comments

Adds an option to move a node from the next row that is higher than the current row inside it during compaction, which requires repacking the current row. This eliminates one ONO case by giving more control over the drawing via aspect ratio or target width.

Signed-off-by: Soeren Domroes [email protected]

soerendomroes avatar May 06 '22 11:05 soerendomroes

Simple example:

algorithm: rectpacking
// rowHeightReevaluation: true

spacing.nodeNode: 0
elk.padding: "[top=0.0,left=0.0,bottom=0.0,right=0.0]"

node n1 {
  layout [size: 20, 20]
}
node n2 {
  layout [size: 20, 20]
}

node n3 {
  layout [size: 20, 20]
}

node n4 {
  layout [size: 20, 20]
}

node n5 {
  layout [size: 80, 80]
}

is drawn like this

rowHeightReeval1 but could be drawn like this

rowHeightReeval2 if the row height is reevaluated during compaction.

soerendomroes avatar Jul 15 '22 12:07 soerendomroes

Superseded by #865

soerendomroes avatar Aug 31 '22 09:08 soerendomroes