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

Links to nodes in collapsed groups rendering improperly

$
0
0

@jpro wrote:

I'm using groups to contain multiple similar nodes. There are links from external nodes to the nodes inside the group. When the group is expanded this is rendered correctly as shown:

However when I collapse the group, some of the links remain pointing to nowhere while others are correctly attached to the group node.

here's my group template.

$(go.Group, "Auto", {
		selectable: false,
		isShadowed: true,
		shadowOffset: new go.Point(0, 1),
		shadowBlur: 5,
		shadowColor: "rgba(0, 0, 0, 0.34)",
		layout: $(go.LayeredDigraphLayout, {
			columnSpacing: 5
		})},
	new go.Binding('isSubGraphExpanded', 'expanded'),

	// main node shape
	$(go.Shape, "RoundedRectangle", {
			parameter1: 10,
			name: "SHAPE",
			fromSpot: go.Spot.RightSide,
			toSpot: go.Spot.LeftSide,
			portId: "",
			stretch: go.GraphObject.Fill,
			strokeWidth: 0,
			minSize: new go.Size(60, 0) },
	),

	// internal panel layer
	$(go.Panel, "Table", {
			shadowVisible: false,
			padding: new go.Margin(3, 5) },
		$(go.Picture, {
				row: 0,
				column: 0,
				source: imageSource,
				scale: 1.1 }
		),
		$(go.TextBlock, {
				row: 0,
				column: 1,
				margin: new go.Margin(0, 0, 0, 5) },
			new go.Binding('text', 'text')
		),
		$("SubGraphExpanderButton", {
				row: 0,
				column: 2,
				margin: new go.Margin(0, 5),
				minSize: new go.Size(18, 18)}
		),
		$(go.Placeholder, {
				row: 1,
				column: 0,
				columnSpan: 3,
				background: 'transparent',
				shadowVisible: false },
			new go.Binding('padding', 'isSubGraphExpanded', function(exp)
			{
				return exp ? 10 : 0;
			}).ofObject()
		)
	)
);

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles