I’d like to display the data that changes to a 10 second interval on the diagram.
Here’s my code.
var myDiagram = $(go.Diagram, this.$el, {
layout: $(go.TreeLayout, {
setsPortSpot: false,
setsChildPortSpot: false,
isRealtime: false,
}),
initialDocumentSpot: go.Spot.Center,
initialViewportSpot: go.Spot.Center,
});
var serviceGroupTemplate = $(
go.Group,
"Vertical",
{
layout: $(go.GridLayout, {
wrappingColumn: 5,
alignment: go.GridLayout.Position,
cellSize: new go.Size(1, 1),
}),
},
{ defaultStretch: go.GraphObject.Horizontal },
{ fromSpot: go.Spot.RightSide, toSpot: go.Spot.LeftSide },
new go.Binding("location", "loc").makeTwoWay(), // TwoWay Binding
...
)
var serverGroupTemplate = $(
go.Group,
"Vertical",
{
layout: $(go.TreeLayout, {
setsPortSpot: false,
setsChildPortSpot: false,
})
},
{ defaultStretch: go.GraphObject.Horizontal },
{ fromSpot: go.Spot.RightSide, toSpot: go.Spot.LeftSide },
...
)
var serverTemplate = $(
go.Node,
"Horizontal",
{ defaultStretch: go.GraphObject.Horizontal },
{ fromSpot: go.Spot.RightSide, toSpot: go.Spot.LeftSide },
...
)
There is a server group in the service group and a server node in the server group.
The problem is that I move the group or node and change to the initial layout 10 seconds later.
I want the group and the node to be in the position I changed in 10 seconds.
I tried with twoway binding, but it dosen’t work
new go.Binding("location", "loc").makeTwoWay(), // TwoWay Binding
How can I do that?