Polymer Custom Element to build diamond diagrams, useful to visualize Operational Transformation flow
Install the component using Bower:
$ bower install juicy-diamond-graph --save
Or download as ZIP.
-
Import Web Components' polyfill:
<script src="bower_components/platform/platform.js"></script>
-
Import Custom Element:
<link rel="import" href="bower_components/juicy-diamond-graph/src/juicy-diamond-graph.html">
-
Start using it!
<juicy-diamond-graph></juicy-diamond-graph>
Attribute | Options | Default | Description |
---|---|---|---|
edges |
array{object} | [] |
Array of DiamondEdge objects. |
Method | Parameters | Returns | Description |
---|---|---|---|
goRightClient |
None. | self | Move Client to the right - new Client version |
goRightServer |
None. | self | Move Server to the right - server sync with Client |
goLeft |
None. | self | Move to the left - new Server version comes to the Client |
goLeftClient |
None. | self | Move Client to the left |
goLeftServer |
None. | self | Move Server to the left |
drawEdge |
from, direction[, length[, dashed[, stroke]]] | self | Draw given edge |
For detailed changelog, check Releases.
MIT