myDiagram.nodeTemplate =$1(go.Node,"Vertical",{
selectionObjectName: "BODY",locationSpot: go.Spot.Left,/*"selectionAdorned":false,禁止出现矩形框*/selectionAdorned:false},
$1(go.Panel, "Auto",{name: "BODY",},
$1(go.Shape, "Rectangle",{fill:"white",stroke:"#4b957e",strokeWidth:4}
),
$1(go.Panel, "Vertical",
$1(go.TextBlock,{stretch: go.GraphObject.Horizontal,
verticalAlignment : go.Spot.Center,//垂直对齐
font: "10pt Verdana, sans-serif",
textAlign:"center",//居中对齐
height:20,
background:"#4b957e"
},
new go.Binding("text", "name")
),
$1(go.Panel, "Vertical",{
stretch: go.GraphObject.Horizontal ,background:"white",padding:5,},
$1(go.Panel, "Table",
$1(go.TextBlock,{
font: "bold 8pt Verdana, sans-serif",
stroke:"#0033fe",
alignment: go.Spot.Center,
verticalAlignment : go.Spot.Center,//垂直对齐
},
new go.Binding("text", "readNum")
),
$1("PanelExpanderButton", "COLLAPSIBLE",{column: 1,alignment: go.Spot.Right})
),
$1(go.Panel, "Table",new go.Binding("itemArray", "actions"),{
defaultAlignment: go.Spot.Left,
name:"COLLAPSIBLE",
background: "white",
stretch: go.GraphObject.Horizontal,
visible:false,//默认折叠
itemTemplate:
$1(go.Panel, "TableRow",
$1(go.TextBlock,new go.Binding("text", "name"),
{ column: 0,alignment: go.Spot.Right,stroke:"#0033fe"}),
$1(go.TextBlock, new go.Binding("text", "value"),
{ column: 1,alignment: go.Spot.Right,stroke:"#0033fe"}),
$1(go.TextBlock, new go.Binding("text", "unit"),
{ column: 2,stroke:"#0033fe",}),
$1(go.TextBlock, new go.Binding("text", "none"),
{ column: 3,}),
$1(go.TextBlock, new go.Binding("text", "none1"),
{ column: 4,}),
$1(go.TextBlock, new go.Binding("text", "none2"),
{ column: 5,}),
$1(go.TextBlock, new go.Binding("text", "none3"),
{ column: 6,})
)
}
)
)
)
)
);
请问在哪里拉伸表面板