@lenxeon wrote:
$(go.Panel, "Horizontal", new go.Binding("itemArray", "topArray"), { row: 0, column: 1, itemTemplate: $(go.Panel, { _side: "top", fromSpot: go.Spot.Top, toSpot: go.Spot.Top, fromLinkable: true, toLinkable: true, cursor: "crosshair", opacity: 0.0, // contextMenu: portMenu }, new go.Binding("portId", "portId"), new go.Binding("name", "portId"), $(go.Shape, "Circle", { fill: 'white', stroke: colors.lightblue, strokeWidth: 1, desiredSize: portSize, // margin: new go.Margin(0, 3) } ) ) // end itemTemplate }), function commonLinkingToolInit(tool) { // FROM tool.temporaryFromPort.figure = "Circle"; tool.temporaryFromPort.fill = '#e9f8ff'; tool.temporaryFromPort.stroke = "green"; tool.temporaryFromPort.strokeWidth = 1; // tool.temporaryFromPort.desiredSize = portSize; ///// TO tool.temporaryToPort.figure = "Circle"; tool.temporaryToPort.fill = '#e9f8ff'; tool.temporaryFromPort.stroke = "green"; tool.temporaryToPort.strokeWidth = 1; // tool.temporaryToPort.desiredSize = portSize; } commonLinkingToolInit(myDiagram.toolManager.linkingTool); commonLinkingToolInit(myDiagram.toolManager.relinkingTool);no margin
with margin, temporaryToPort position is wrong
Posts: 2
Participants: 2

