Frontend API
export class Flow
The Flow is the main data structure of the project.
It contains the graph, that is the ensemble of elements that describe the process that the user wants to execute/simulate. This process is composed of nodes, connected with edges.
The flow also contains groups, that are some subgraph of the graph. They are used to let the user simulate some part of the graph instead of everything.
Beside that, the flow contains the library of components available.
We represent and store the flow as a JSON file. This web interface uses it, and only it, to create the view.
Created by antoine on 12/06/17.
setFlow (flow: Object)
Build the flow from the object received from the server
- Parameters:
flow
—
indexOfEdge (edge: Edge): number
Give the index of the given edge
- Parameters:
edge
—
indexOfNode (node: Node): number
Give the index of the given node
- Parameters:
node
—
indexOfGroup (group: Group): number
Give the index of the given group
- Parameters:
group
—
updateEdge (oldEdge: Edge, newEdge: Edge)
Update all the values of the edge, except the id
- Parameters:
edge
—