I created a node(printBox) and set the value of avoidable to false.
The routing property of the link is go.Link.AvoidsNodes.
First,
Then,I add a node(printBox) on myDiagram
I hope that the links path is just not affected by printBox.What should I do?
myDiagram.nodeTemplateMap.add("printBox",
g_(go.Node, "Viewbox",{
rotatable: true,
locationSpot: go.Spot.Center,
locationObjectName: "SHAPE",
selectionObjectName: "SHAPE",
avoidable: false,
isLayoutPositioned:false,
// don't re-layout when node changes size
layoutConditions: go.Part.LayoutStandard & ~go.Part.LayoutNodeSized,
background: null
},
new go.Binding("location","loc",go.Point.parse).makeTwoWay(go.Point.stringify),
g_(go.Panel, "Spot", g_(go.Shape, "Rectangle", {
name: "SHAPE",
stroke: "rgba(255,0,0,1)",
strokeWidth: 10,
fill: "rgba(0,0,0,0)",
scale: 1
},new go.Binding("zOrder"),
new go.Binding("stroke","color").makeTwoWay(),
new go.Binding("strokeWidth","thickness").makeTwoWay(),
new go.Binding("desiredSize","desiredSize",go.Size.parse).makeTwoWay(go.Size.stringify)),
g_(go.TextBlock, {
text: "page number",
stroke:"rgba(255,0,0,1)",
font: "bold 20pt serif",
alignment: new go.Spot(1,1,-30,-30),
editable: true, isMultiline: false
},
new go.Binding("text","text").makeTwoWay()))));