Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Optimise layout to smallest square required

$
0
0

@MartinWillitts wrote:

I have an ordered list of short pieces of text, usually just one or a few words. I would like to lay them out in a square. I can lay them out horizontally or vertically and I can set the column count to make them wrap. What I'd like to do is not have to set the column count but the wrapping to be done automatically so the square is filled up rather than made wider or taller.

It's similar to resizing a rectangle manually so the text elements wrap and then stopping the resizing when I can visually see the rectangle is as square as it can be.

For example, the following
|First phrase-Second phrase-Third-Fourth-Fifth|
would become
|First phrase------|
|Second phrase-----|
|Third-Fourth-Fifth|

I can either fix the shape as the square and somehow optimise the layout to minimise size of the square so everything fits or I can make it a rectangle and somehow change the column count until the width and height are as close as possible for everything to still fit.

Any suggestions to help me use GoJS in this way?

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles