Temporarylink fromSport and toSpot dynamic?

Can gojs temporarylink also make fromSport and toSpot dynamic?

this.diagram.toolManager.linkingTool.temporaryLink.fromSpot
this.diagram.toolManager.linkingTool.temporaryLink.toSpot

can we make these values ​​dynamic according to the point of linking?

Depends on what you want to do, and when. Either set LinkingBaseTool | GoJS API or override LinkingBaseTool | GoJS API and LinkingBaseTool | GoJS API.

I’m trying to override copyPortProperties but I get an error

copyPortProperties is protected and only accessible through and instance error

How to use copyPortProperties ?

        class TestTool extends go.LinkingBaseTool {
            // new data properties (fields) get declared and initialized here

            constructor() {
                super();
            }

            public copyPortProperties() {
                
                go.LinkingBaseTool.prototype.copyPortProperties.call(this);
            }
        }

        TestTool .prototype.copyPortProperties();

This would be equivalent to what you’ve tried to write:

class TestTool extends go.LinkingTool {
  protected copyPortProperties(realnode: Node | null, realport: GraphObject | null, tempnode: Node,
                               tempport: GraphObject, toend: boolean): void {
    super.copyPortProperties(realnode, realport, tempnode, tempport, toend);
  }
}

Then to install your new LinkingTool:

$(go.Diagram, . . .,
  { . . .,
    linkingTool: new TestTool()
  })

Thanks for your help walter.