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

Resizing pictures inside nodes

$
0
0

@ussenator4u wrote:

            $(go.Picture,
		{ maxSize: new go.Size($scope.objectWidth, $scope.objectHeight)},
		new go.Binding("source", "img")),

	$(go.TextBlock,
	// the default alignment is go.Spot.Center
	new go.Binding("text", "text"))

My problem is I am setting the Node width and height later based on the aspect ratio of page. I am not sure how to make the size of image inside that node to be same as of the node.

If I give specific values like { maxSize: new go.Size(50, 50)}, then it works fine but that is not my case.
I want maxSize OR width or height to be dynamic.
I can change size of node dynamically but not size of image.

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 6968

Trending Articles