1.Firstly, I am getting empty space on panel table.
this issue raised when panel Item Array Text length is less than main node text.
Before use stretch: go.GraphObject.Fill :
After use stretch: go.GraphObject.Fill :
2.Secondly, By Applying stretch: go.GraphObject.Fill Extra space is removed
but in case of panel text is larger than main node text, panel text is hiding.
how can I resolve text hiding issue?
Code:
Table Panel:
$(go.Panel, “Table”,
{
name: “COLLAPSIBLE”,
padding: 2,
margin: 0,
row: 1,
columnSpan: 2,
itemTemplate: DetailsTemplate,
minSize: new go.Size(100, NaN),
visible: false,
defaultAlignment: go.Spot.Left,
defaultRowSeparatorStroke: go.Brush.lighten(“grey”),
defaultRowSeparatorStrokeWidth: 1,
background: “#fef5d9”,
stretch: go.GraphObject.Fill
},
new go.Binding("itemArray", "ruledetails"),
),
itemTemplate:
var DetailsTemplate =
$(go.Panel, “TableRow”,
{
row: 1,
columnSpan: 2,
},
new go.Binding(“portId”, “name”),
{
background: UnselectedBrush,
fromSpot: go.Spot.LeftRightSides,
toSpot: go.Spot.LeftRightSides,
fromLinkable: true, toLinkable: true,
click: onFieldClick,
mouseEnter: function (e: any, item: any) {
if (!isFieldSelected(item)) {
item.background = “#dbdbbe”;
}
},
mouseLeave: function (e: any, item: any) {
if (!isFieldSelected(item) && item !== selectedRow) {
item.background = UnselectedBrush;
}
}
},
$(go.TextBlock, new go.Binding(“text”, “rulename”),
{
row: 1, columnSpan: 2, height:16,
font: “14px sans-serif”,
stretch: go.GraphObject.Fill,
overflow: go.TextBlock.OverflowEllipsis,
},),
);