I have the border on as a stroke on a shape. This is the basis for my navigation group with a placeholder and stroke on rounded rectangle shape. Where would I have the padding with a negative margin bottom? On the auto Panel?
$(go.Group,
'Spot',
this.nodeStyle(),
{
computesBoundsAfterDrag: true,
handlesDragDropForMembers: true,
layout: $(NavigationGroupLayout, { //based on GridLayout
wrappingWidth: Infinity,
alignment: go.GridLayout.Position,
cellSize: new go.Size(1, 1),
spacing: new go.Size(10, 10),
comparer: function(a, b) {
// Allow nodes within the nav group to be rearranged via the x-axis
const ax = a.location.x
const bx = b.location.x
if (isNaN(ax) || isNaN(bx)) return 0
if (ax < bx) return -1
if (ax > bx) return 1
return 0
}
}),
mouseDragEnter: function(e, obj) {
obj.background = 'rgba(151,151,255,0.8)'
},
mouseDragLeave: function(e, obj) {
obj.background = 'transparent'
},
memberValidation: (group, node) => {},
mouseDrop: function(e, grp) {}
},
$(
go.Panel,
'Vertical',
// Navigation Shape
$(
go.Panel,
'Auto',
{
stretch: go.GraphObject.Horizontal
},
$(
go.Shape,
'RoundedRectangle',
{
minSize: new go.Size(this.GroupNodeWidth, this.GroupNodeHeaderHeight),
fill: 'transparent',
stroke: this.GroupNodeStroke,
strokeWidth: this.GroupNodeStrokeWidth,
strokeDashArray: [8, 2],
parameter1: 4 // corner radius
},
new go.Binding('stroke', 'isSelected', (isSelected) => {
return isSelected ? this.GroupNodeSelectedStroke : this.GroupNodeStroke
}).ofObject(),
new go.Binding('strokeWidth', 'isSelected', (isSelected) => {
return isSelected ? 2 : this.GroupNodeStrokeWidth
}).ofObject()
),
// Header Panel
$(
go.Panel,
'Horizontal',
{
alignment: go.Spot.TopLeft,
stretch: go.GraphObject.Horizontal,
height: this.GroupNodeHeaderHeight - 1,
background: this.GroupNodeHeaderFill
},
$('SubGraphExpanderButton', {
alignment: go.Spot.Right,
margin: 5
}),
$(
go.TextBlock,
this.textStyle(),
{
textAlign: 'start',
overflow: go.TextBlock.OverflowClip,
editable: true
},
new go.Binding('text', 'label').makeTwoWay()
)
),
// Dropzone placeholder
$(go.Placeholder, {
padding: new go.Margin(this.GroupNodeHeaderHeight + 5, 10, 10, 10)
})
)
),
Port.getPort(true, {
portId: 'in',
alignment: go.Spot.Left
}),
Port.getPort(false, {
portId: 'out',
alignment: go.Spot.Right
})
)