本文へ移動

@eightkk/vue-weave / core / validateGraphLayoutResponse

Function: validateGraphLayoutResponse() ​

validateGraphLayoutResponse(request, response): GraphLayout

Defined in: src/core/graphLayoutRequests.ts:217

Checks a layout computed for a request and returns it. The response must echo the request's requestId, inputKey and scope (Error otherwise, for a stale or foreign response). Every request node needs a finite box with a positive size. For a 'shown' request, as NetworkGraph checks its layout, the width and height must also be finite and positive, every edge needs a path, and route metadata, when present, must have finite points and the edge's ports. Throws Error for a missing box, path or map, or a mismatched route, and RangeError for invalid numbers.

Parameters ​

request ​

GraphLayoutRequest

response ​

GraphLayoutResponse

Returns ​

GraphLayout

MIT ライセンスで公開しています。