@g.bartoli wrote:
Hi,
I'm continuing doing experiments with Tree/ForceDirected switching layout and I have a question regarding the link connection point on nodes using irregular shapes like a star.I read the introduction to connections and in my graph with ForceDirectedLayout everything works as expected, since when I move the star node, the connection correctly stay attached to the closest point on the star.
Conversely, when I switch to TreeLayout, the connection starts from the bounding box of the star, regardless of its position when I drag it.
Is this an intended behavior or is there a way to make it work like in ForceDirectedLayout?
This is my linkTemplate:
myDiagram.linkTemplate = $(go.Link, { selectable: false, }, $(go.Shape, new go.Binding("stroke", "cabletype", cableType2Color), new go.Binding("strokeWidth", "cabletype", cableType2Width) ), $(go.Panel, "Auto", $(go.Shape, { fill: $(go.Brush, "Radial", { 0: "rgb(240, 240, 240)", 0.5: "rgb(240, 240, 240)", 1: "rgba(240, 240, 240, 0)" }), stroke: null }), $(go.TextBlock, { textAlign: "center", font: "13pt helvetica, arial, sans-serif", stroke: "black", margin: 4 }, new go.Binding("text", "", createLinkLabel) ) ) );
Thanks,
Guido
Posts: 1
Participants: 1