-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
49 lines (43 loc) · 1.75 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title><juicy-diamond-graph></title>
<link rel="stylesheet" href="http://juicy.github.io/github-markdown-css/github-markdown.css">
<!-- Importing Web Component's Polyfill -->
<script src="../platform/platform.js"></script>
<!-- Importing Custom Elements -->
<link rel="import" href="src/juicy-diamond-graph.html">
<style>
juicy-diamond-graph{
float: left;
}
</style>
</head>
<body class="markdown-body">
<h1><juicy-diamond-graph></h1>
<a href="https://github.com/Juicy/juicy-diamond-graph"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
<p>
Polymer Custom Element to build diamond diagrams, useful to visualize <a href="http://en.wikipedia.org/wiki/Operational_transformation">Operational Transformation</a> flow.
</p>
<!-- Using Custom Elements -->
<juicy-diamond-graph></juicy-diamond-graph>
<!-- brief API demo -->
<dl>
<dt><button onclick="goRightClient()">.goRightClient()</button></dt><dd> - new Client version</dd>
<dt><button onclick="goRightServer()">.goRightServer()</button></dt><dd> - server sync with Client</dd>
<dt><button onclick="goLeft()">.goLeft()</button></dt><dd> - new Server version comes to the Client</dd>
</dl>
<script type="text/javascript">
function goLeft(){
document.querySelector("juicy-diamond-graph").goLeft();
}
function goRightServer(){
document.querySelector("juicy-diamond-graph").goRightServer();
}
function goRightClient(){
document.querySelector("juicy-diamond-graph").goRightClient();
}
</script>
</body>
</html>