Import SnapLinkReshapingTool in Angular

Hello,
I want to include the SnapLinkReshapingTool script, but I am not sure how to do this in Angular. I saved it in my repository and referenced it in the component via

declare const SnapLinkReshapingTool: any;

I am not sure how to add this to the diagram definition as well, since this gave me a few errors during the runtime.

Best regards
Jonas Czeslik

If you imported the TS file correctly, you should not need that declaration.

Replace the standard LinkReshapingTool when you are initializing the Diagram:

$(go.Diagram, . . .,
  { . . .,
    linkReshapingTool: new SnapLinkReshapingTool()
  })

Okay, then I am not sure, if I included the file correctly. I also only found a javascript file, not a typescript one.

Where can I find the typescript version?

EDIT: Nevermind, I found the according file and was able to import it correctly!
Thanks a lot!

1 Like