I have a go js diagram which uses table layout ,
I want to move the rows to swap position .
How can i do that?
This is my group template
const templateName = 'ListContainer';
this.diagram.groupTemplateMap.add(templateName,
$(go.Group, 'Auto',
{
layerName: 'Background',
name: 'LIST_CONTAINER',
stretch: go.GraphObject.Fill,
width: 500,
height: 600,
selectable: false,
computesBoundsAfterDrag: false,
computesBoundsIncludingLocation: false,
handlesDragDropForMembers: false,
mouseDragEnter: function (e: go.InputEvent, group: any, prev: go.GraphObject) { group.isHighlighted = true; },
mouseDragLeave: function (e: go.InputEvent, group: any, next: go.GraphObject) { group.isHighlighted = false; },
mouseDrop: (e, obj) => this.listContainerGroupMouseDropHandler(e, obj)
},
new go.Binding('row'),
new go.Binding('column', 'col'),
$(go.Shape,
{
stroke: 'lightgray',
fill: 'white',
stretch: go.GraphObject.Fill,
},
),
$(go.Panel, 'Auto', { name: 'LIST_CONTAINER' },
{ width: 300, margin: 10 },
$(go.Shape,
{
stroke: 'lightgray',
fill: 'white',
stretch: go.GraphObject.Fill,
},
),
$(go.Panel, 'Table',
{
name: 'POSITIONS_CONTAINER_DATA',
defaultRowSeparatorStroke: 'lightgray',
defaultRowSeparatorStrokeWidth: 1,
stretch: go.GraphObject.Fill,
itemTemplate: this.setupListRowContainerTemplate()
},
new go.Binding('itemArray', 'positions')
)
)
));