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

How to arrange elements based on their positions within Group's local coordinate?

$
0
0

@tiepna wrote:

I'm prefer to this:
http://gojs.net/latest/intro/panels.html
And I'm using :
$(go.Panel, go.Panel.Position, $(go.Placeholder, { padding: 5}))

But it's not working

here is my groupTemplate:
var groupTempl = $(go.Group, "Auto",
{
fromSpot: go.Spot.AllSides,
toSpot: go.Spot.AllSides,
isSubGraphExpanded:true
},
new go.Binding("location", "location", function(locStringify){
return go.Point.parse(locStringify);
}).makeTwoWay(go.Point.stringify),
$(go.Shape, "Rectangle", { fill: null, stroke: "#4472C4", strokeWidth: 2 }),
$(go.Panel, go.Panel.Vertical, // title above Placeholder
$(go.Panel, go.Panel.Horizontal, // button next to
// TextBlock
{ stretch: go.GraphObject.Horizontal, margin: 1 },
$("SubGraphExpanderButton",
{ alignment: go.Spot.Right, margin: 5
}),
$(go.TextBlock,
{
alignment: go.Spot.Left,
editable: true,
margin: 5,
font: "bold 18px 'Open Sans'",
stroke: "#4472C4"
},
new go.Binding("text", "label"))
), // end Horizontal Panel

    				       	$(go.Panel, go.Panel.Position,
    					  	          $(go.Placeholder,
    								            { padding: 5})
    					       	)
    			        )
    	); // end Group

Sorry, i need to more specific my question:
For Example, i have:
Node A with Location(0,0) in Group B.
Node C with Location(0,0) not in any group.
What i want here is Node A not overlapping with Node C.
And Location of Node A belong GroupB 's Coordinate system

Posts: 4

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles