elkjs icon indicating copy to clipboard operation
elkjs copied to clipboard

constrain the diagram to fit a particular dimension width and height

Open CrashLaker opened this issue 1 year ago • 2 comments

hi,

is it possible to set a maximum height and width?

image

regards,c.

CrashLaker avatar Aug 27 '23 02:08 CrashLaker

This is not directly possible using the layered algorithm. You could try to set a layer bound when using the COFFMAN_GRAHAM layering.strategy to make the drawing wider or set layer constraints using partition.

soerendomroes avatar Aug 28 '23 06:08 soerendomroes

hi @soerendomroes thank you for your reply 1st approach was already suffice for me thanks a lot! 2nd approach looks more complex. i'll look into that image

regards,c.

CrashLaker avatar Aug 28 '23 07:08 CrashLaker