您好,我开发了一个代码,其中 MynodeTemplate 看起来像
GO(go.Node, "Auto",
GO(go.Shape,
new go.Binding("fill", "boxcolor")),
GO(go.Panel, "Table",
{ defaultAlignment: go.Spot.Left, margin: 4 },
GO(go.RowColumnDefinition, { column: 1, width: 4 }),
GO(go.TextBlock,
{ row: 0, column: 0, columnSpan: 3, alignment: go.Spot.Center },
{ font: "bold 12pt sans-serif" },
new go.Binding("text", "name")),
//Checkbox code
GO(go.TextBlock, "Meta Item : ",
{ row: 1, column: 0 }),
GO(go.TextBlock,
{ row: 1, column: 2 },
new go.Binding("text", "MetaItemName")),
GO(go.TextBlock, "Perspective: ",
{ row: 2, column: 0 }),
GO(go.TextBlock,
{ row: 2, column: 2 },
new go.Binding("text", "PerspectiveName")),
),
new go.Binding("scale", "scale").makeTwoWay(),
new go.Binding("font", "font").makeTwoWay(),
new go.Binding("location", "loc", go.Point.parse).makeTwoWay(go.Point.stringify),
new go.Binding("locationSpot", "dir", function(d) { return spotConverter(d, false); })
);
和 UI 看起来像
我想在我的名字旁边放一个复选框,所以我有类似的代码
GO("CheckBox","name",{row:1,column:1}),
但它不会来