Hi,
how can i get multiple link from single node in different Ports.
Here as shown in given image I am not able to link multiple link from different port in single node
So can you tell me how it is possible to link different link from different ports
For this i am using this code
For creating Node
myDiagram.nodeTemplateMap.add("", // the default category
(go.Node, "Spot", nodeStyle(),
// the main object is a Panel that surrounds a TextBlock with a rectangular Shape
(go.Panel, “Auto”,
(go.Shape, "Rectangle",
{ fill: "#00A9C9", stroke: null },
new go.Binding("figure", "figure")),
(go.TextBlock,
{
font: “bold 11pt Helvetica, Arial, sans-serif”,
stroke: lightText,
margin: 8,
maxSize: new go.Size(160, NaN),
wrap: go.TextBlock.WrapFit,
editable: true
},
new go.Binding(“text”).makeTwoWay())
),
// four named ports, one on each side:
makePort(“T”, go.Spot.Top, true, true),
makePort(“L”, go.Spot.Left, true, true),
makePort(“R”, go.Spot.Right, true, true),
makePort(“B”, go.Spot.Bottom, true, true)
));
For creating link :
var linkSelectionAdornmentTemplate =
(go.Adornment, "Link",
(go.Shape,
// isPanelMain declares that this Shape shares the Link.geometry
{ isPanelMain: true, fill: null, stroke: “deepskyblue”, strokeWidth: 0 }) // use selection object’s strokeWidth
);
myDiagram.linkTemplate =
$(MultiArrowLink, // subclass of Link, defined below
{
relinkableFrom: true,
relinkableTo: true,
reshapable: true,
resegmentable: true
},
$(go.Shape,
{ isPanelMain: true },
new go.Binding("fill", "color"))
// no arrowhead is defined here -- they are hard-coded in MultiArrowLink.makeGeometry
);