The type the coordinates for vertices will be transformed into.
The type of value on vertices.
The type of value on edges.
The ColoredGraph that this component currently displays.
Defines options for displaying each edge. Override to customize the appearance.
The coordinate of the "from" vertex.
The value of the "from" vertex.
Indicating whether or not this edge is part of the winning set.
The coordinate of the "to" vertex.
The value of the edge.
For usage details of Edge
see the documentation of
vis.js.
Defines options for displaying each vertex. Override to customize the appearance.
The coordinate of this vertex.
The value of this vertex.
Indicating whether or not this vertex is part of the winning set.
The outgoing edges, their target coordinates and values, of this vertex.
For usage details of Node
see the documentation of
vis.js.
Defines options used when defining the network. Override to define custom options.
For usage details of Options
see the documentation of
vis.js.
Override to define an action to take when the user clicks on a edge.
Probably some form of interaction with window.boardgame.inputMove(...)
.
The coordinate of the "from" vertex.
The value of the "from" vertex.
The coordinate of the "to" vertex.
The value of this edge.
Override to define an action to take when the user clicks on a vertex.
Probably some form of interaction with window.boardgame.inputMove(...)
.
The coordinate of this vertex.
The value of this vertex.
The outgoing edges, their target coordinates and values, of this vertex.
Updates graph with the latest model from Haskell. The default implementation assumes the model is a direct representation of a ColoredGraph. In the case of other models, override this method and transform it into a ColoredGraph.
If the Haskell models i
is string
or number
, use
ColoredGraph.mapToKeyValueString and
ColoredGraph.mapToKeyValueNumber respectively.
The state received from the Haskell model. Can be anything.
Generated using TypeDoc
A React component that can display games where the underlying model is (or transformable into) a ColoredGraph.
Extend this component to customize its appearance.
It render a single
div.graph-container
. The inside of thediv
is implementation specific and subject to change.