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

contentAlignment On Demand

$
0
0

@Tany wrote:

Hi,
I would like to Center my node's/groups on demand.
To be more accurate, as soon as the user presses a key, i divide the nodes into groups and i would like to center the groups in the middle of the diagram. I use the Circular autolayout.
If i do:
diagram.layout = $(go.CircularLayout, { isOngoing: false, isInitial: false, isViewportSized: false });
diagram.contentAlignment = go.Spot.Center;
diagram.layout.isValidLayout = false;
diagram.layoutDiagram(false);

The nodes are auto layout, but then, dragging a node cause the diagram to center all other nodes.
I want to center the groups only when the groups are created ?
How?....
Thanks
Tany

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles