Ir al contenido

Router

Defined in: render/Router.ts:16

GoJS-compatible: abstract base class for a pluggable link-routing strategy, mirroring real GoJS’s Router. graphojs’s own rendering already computes link paths per Link.routing/avoidObstacles (render/LinkRouter.ts’s route* functions) rather than delegating to an instantiable Router — subclassing this and overriding routeLinks lets ported GoJS code plug into that decision instead of the individual per-link flags, but graphojs itself doesn’t consult a Router instance anywhere in its own rendering path.

new Router(): Router

Router

isEnabled: boolean = true

Defined in: render/Router.ts:18


isRealtime: boolean = false

Defined in: render/Router.ts:19


name: string = ''

Defined in: render/Router.ts:17

get diagram(): Diagram | null

Defined in: render/Router.ts:22

Diagram | null

set diagram(value): void

Defined in: render/Router.ts:26

Diagram | null

void

canRoute(_container): boolean

Defined in: render/Router.ts:36

Whether this router applies to the given container at all. Default: isEnabled.

Diagram | Group

boolean


invalidateRouter(): void

Defined in: render/Router.ts:31

Request that routes be recomputed; the default just invalidates the diagram.

void


isRoutable(_link, _container): boolean

Defined in: render/Router.ts:41

Whether this router should route the given link. Default: always.

Link

Diagram | Group

boolean


abstract routeLinks(links, container): void

Defined in: render/Router.ts:46

Route every link in links, within container. Must be overridden.

Set<Link>

Diagram | Group

void