Skip to content

Losing Routing Points - Part II. #1435

Answered by tortmayr
rsoika asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @rsoika,

to customize the GLSPManhattanEdgeRouter simply create a subclass that extend GLSPManhattanEdgeRouter and rebind it accordingly in your diagram module

rebind(GLSPManhattanEdgeRouter).to(YoucCustomRouter).inSingletonScope();

Alternatively if you want to create our own routing algorithm you can configure a new IEdgeRouter. There is an abstract base class (AbstractEdgeRouter) that you can use as starting point.
Note that you also of to configure IAnchorComputer for your custom router. Typically you need at least anchor computer for the Ellipse,Rectangle and Diamond anchors:

@injectable()
export class MyCustomRouter extends AbstractEdgeRouter {
    static readonly KIND = 'custom';

 

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by rsoika
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants