Hello,
I have a nodeTemplate with “spot” containing a Picture, a label and ports but they are all on top of each other and Would like to make the label in the bottom of the picture but keep the ports on top of the Picture. How can i do that please ?
Here is my code :
myPalette.nodeTemplate = $( go.Node, "Spot", $( go.Picture, { portId: "", fromLinkable: true, toLinkable: true, cursor: "pointer", fromSpot: go.Spot.Right, toSpot: go.Spot.Left, margin: 10, width: 70, height: 70 }, new go.Binding("source") ), // four small named ports, one on each side: makePort("T", go.Spot.Top, false, true), makePort("L", go.Spot.Left, true, true), makePort("R", go.Spot.Right, true, true), makePort("B", go.Spot.Bottom, true, false), { // handle mouse enter/leave events to show/hide the ports mouseEnter: function(e, node) {showSmallPorts(node, true);}, mouseLeave: function(e, node) {showSmallPorts(node, false);} }, $( go.TextBlock, "Default Text", { margin: 0, stroke: "black", font: "bold 16px sans-serif", wrap: go.TextBlock.WrapFit, verticalAlignment: go.Spot.Bottom }, new go.Binding("text", "name") ) );
Thanks for the help