OSDN Git Service

ノードの更新が反映されるようになった
[chnosproject/AI004.git] / mgcanvas / index.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta http-equiv="X-UA-Compatible" content="IE=9">
5 <meta charset="UTF-8">
6 <title>Mind Graph Canvas</title>
7 <style type="text/css">
8         h1, h2, h3 {
9                 margin:0px;
10         }
11         body, textarea {
12                 font-family: Consolas, 'Courier New', Courier, Monaco, monospace;
13                 font-size: 14px;
14                 line-height: 1.2;
15         }
16 </style>
17 <script type="text/javascript" src="./header.js" charset="UTF-8"></script>
18 <script type="text/javascript">
19
20 var mgmain;
21 var memdb;
22
23 onload = function() {
24         memdb = new MemoryDB("./../memdb/memdb.php");
25         mgmain = new MGCanvas(document.getElementById("mainCanvas"));
26         mgmain.setSourceMemoryDB(memdb);
27 }
28 </script>
29 </head>
30 <body>
31 <h1>Mind Graph Canvas</h1>
32 <canvas id="mainCanvas" width="1024" height="768" style="border:1px solid #000000;"></canvas>
33 <br />
34 <button onclick="mgmain.bringToCenter();">Center</button>
35 <button onclick="mgmain.isPaused = !mgmain.isPaused;">Freeze</button>
36 <button onclick="mgmain.zoomIn();">+</button>
37 <button onclick="mgmain.zoomOut();">-</button>
38 <button onclick="mgmain.moveViewRelative(0, -10);">↑</button>
39 <button onclick="mgmain.moveViewRelative(0, 10);">↓</button>
40 <button onclick="mgmain.moveViewRelative(-10, 0);">←</button>
41 <button onclick="mgmain.moveViewRelative(10, 0);">→</button>
42 <br />
43 identifier:<input id="identBox" type="text"></input>
44 <br />
45 <button onclick="mgmain.setIdentifierForSelectedNode(getElementById('identBox').value);">setNodeIdent</button>
46 <button onclick="memdb.updateNode(getElementById('identBox').value);">addNode</button>
47
48 </body>
49 </html>