Mercurial > hg > Members > nobuyasu > html > graphViewer
annotate index.html @ 10:3fa1be92ab48 draft
modified update node.position
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 20 Mar 2013 07:38:29 +0900 |
parents | 35ee0b1d8719 |
children | 38990a120dd6 |
rev | line source |
---|---|
0 | 1 <meta http-equiv="content-type" content="text/html;charset=utf-8" /> |
2 <title>Graph Display</title> | |
3 <link rel='stylesheet' href="css/viewer_form.css"> | |
4 <script type="text/javascript" src="js/lib/jquery-1.8.1-min.js"></script> | |
5 <script type="text/javascript" src="js/lib/jquery-ui-1.8.23-min.js"></script> | |
6 <script type="text/javascript" src="js/lib/jquery.ui.touch-punch.min.js"></script> | |
7 <script type="text/javascript" src="js/lib/jsBezier-0.4-min.js"></script> | |
8 <script type="text/javascript" src="js/1.3.15/jsPlumb-util-1.3.15-RC1.js"></script> | |
9 <script type="text/javascript" src="js/1.3.15/jsPlumb-dom-adapter-1.3.15-RC1.js"></script> | |
10 <script type="text/javascript" src="js/1.3.15/jsPlumb-1.3.15-RC1.js"></script> | |
11 <script type="text/javascript" src="js/1.3.15/jsPlumb-defaults-1.3.15-RC1.js"></script> | |
12 <script type="text/javascript" src="js/1.3.15/jsPlumb-renderers-svg-1.3.15-RC1.js"></script> | |
13 <script type="text/javascript" src="js/1.3.15/jsPlumb-renderers-canvas-1.3.15-RC1.js"></script> | |
14 <script type="text/javascript" src="js/1.3.15/jsPlumb-renderers-vml-1.3.15-RC1.js"></script> | |
15 <script type="text/javascript" src="js/1.3.15/jquery.jsPlumb-1.3.15-RC1.js"></script> | |
16 <script type="text/javascript" src="js/1.3.15/jquery.jsPlumb-1.3.15-all-min.js"></script> | |
17 | |
10
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
18 |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
19 <div id="traverseDisplay" style='position:fixed; width:250px; height:250px; border:solid 1px; border-radius:5px; opacity:1; z-index:10; visibility:visible;'> |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
20 <div style='position:absolute; left:0; top:0; width:100%; height:100%; background:black; opacity:0.7;'></div> |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
21 <div id="closeTraverseDisplay" style='position:absolute; right:5; top:-3; z-index:10; color:white;' onclick="$('#traverseDisplay').css('visibility','hidden');" onmouseover="$('#closeTraverseDisplay').css('color','yellow');" onmouseout="$('#closeTraverseDisplay').css('color','white')" >CLOSE</div> |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
22 <div style='position:absolute; width:90%; height:90%;'> |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
23 <div style='position:absolute; left:5%; top:5%; width:100%; height:100%; background:white;'> |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
24 <div id="traverseDisplayTitle" style='position:absolute; left:10px; top:5px; font-size:24px; width:100%; text-align:left;'> |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
25 Traverse |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
26 </div> |
3
d006eeb10183
modified traverse checkbox
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
2
diff
changeset
|
27 <div style='position:absolute; top:30px; width:100%; margin-left:10px;'> Direction: |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
28 <label style='position:relative;' ><input id="direction_in" type='checkbox' checked value='in'/>IN</label> |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
29 <label style='position:relative;'><input id="direction_out" type='checkbox' checked value='out'/>OUT</label> |
3
d006eeb10183
modified traverse checkbox
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
2
diff
changeset
|
30 </div> |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
31 <div id="traverseDisplayBody" style='position:absolute; left:20px; top:50px;'> |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
32 Please click any node. |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
33 </div> |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
34 </div> |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
35 </div> |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
36 <span class='button display' style='position:absolute; width:100; left:75; bottom:5; opacity:1;' onclick='traverseAction();'>traverse</span> |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
37 </div> |
0 | 38 |
10
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
39 <div id="miniDisplay" style='position:fixed; width:250px; height:250px; border:solid 1px; border-radius:5px; opacity:1; z-index:10; visibility:visible;'> |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
40 <div style='position:absolute; left:0; top:0; width:100%; height:100%; background:black; opacity:0.5;'></div> |
0 | 41 <div id="closeMiniDisplay" style='position:absolute; right:5; top:-3; z-index:10; color:white;' onclick="$('#miniDisplay').css('visibility','hidden');" onmouseover="$('#closeMiniDisplay').css('color','yellow');" onmouseout="$('#closeMiniDisplay').css('color','white')" >CLOSE</div> |
42 <div style='position:absolute; width:90%; height:90%;'> | |
43 <div style='position:absolute; left:5%; top:5%; width:100%; height:100%; background:white;'> | |
44 <div id="miniDisplayTitle" style='position:absolute; left:10px; top:5px; font-size:24px; width:100%; text-align:left;'> | |
45 </div> | |
46 <div id="miniDisplayBody" style='position:absolute; left:20px; top:40px;'> | |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
47 Please click any node. |
0 | 48 </div> |
49 </div> | |
50 </div> | |
51 </div> | |
52 | |
53 <div class="graphMainCss" style="position:absolute; left:0; bottom:0; width:100%; height:75%;" id='graphMain'> | |
54 <div style="position:absolute; width:0; height:0;left:0;" id='graphRoot'> | |
55 </div> | |
56 </div> | |
57 | |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
58 |
0 | 59 <script type="text/javascript"> |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
60 var BASE_URL = ""; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
61 |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
62 |
0 | 63 if(!Array.prototype.filter){ |
64 Array.prototype.filter=function(func){ | |
65 var arr=[]; | |
66 for(var i=0;i<this.length;i++)if(func(this[i]))arr.push(this[i]); | |
67 return arr; | |
68 } | |
69 } | |
70 | |
71 function loadUserList() { | |
72 $.ajax({ | |
73 url:BASE_URL + "/users/all", | |
74 success:function(o) { userList = o.sort(); showUserList([]); }, | |
75 type:"GET", cache:false, | |
76 error:function(o) { console.log("loadUserList error : ",o); } | |
77 }); | |
78 } | |
79 | |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
80 function GraphData() { |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
81 var graphData = {}; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
82 graphData.nodes = {}; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
83 graphData.edges = {}; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
84 return graphData; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
85 } |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
86 |
0 | 87 function beginScript() { |
88 DragHandler.attach($('#miniDisplay')[0]); | |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
89 DragHandler.attach($('#traverseDisplay')[0]); |
0 | 90 } |
91 | |
92 var DragHandler = { | |
93 _oElem : null, | |
10
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
94 _id : null, |
0 | 95 attach : function(oElem) { |
96 oElem.onmousedown = DragHandler._dragBegin; | |
97 return oElem; | |
98 }, | |
10
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
99 /* TODO: refoctoring */ |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
100 attach : function(oElem, id) { |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
101 oElem.onmousedown = DragHandler._dragBegin; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
102 _id = id; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
103 return oElem; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
104 }, |
0 | 105 _dragBegin : function(e) { |
106 var oElem = DragHandler._oElem = this; | |
107 if (isNaN(parseInt(oElem.style.left))) { oElem.style.left = '0px'; } | |
108 if (isNaN(parseInt(oElem.style.top))) { oElem.style.top = '0px'; } | |
109 var x = parseInt(oElem.style.left); | |
110 var y = parseInt(oElem.style.top); | |
111 e = e ? e : window.event; | |
112 oElem.mouseX = e.clientX; | |
113 oElem.mouseY = e.clientY; | |
114 document.onmousemove = DragHandler._drag; | |
115 document.onmouseup = DragHandler._dragEnd; | |
116 return false; | |
117 }, | |
118 _drag : function(e) { | |
119 var oElem = DragHandler._oElem; | |
120 var x = parseInt(oElem.style.left); | |
121 var y = parseInt(oElem.style.top); | |
122 e = e ? e : window.event; | |
10
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
123 var nextX = x + (e.clientX - oElem.mouseX); |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
124 var nextY = y + (e.clientY - oElem.mouseY); |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
125 oElem.style.left = nextX + 'px'; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
126 oElem.style.top = nextY + 'px'; |
0 | 127 oElem.mouseX = e.clientX; |
128 oElem.mouseY = e.clientY; | |
10
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
129 if (_id) { |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
130 var node = GRAPH_DATA.nodes[_id]; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
131 node.position.x = nextX; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
132 node.position.x = nextY; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
133 } |
0 | 134 return false; |
135 }, | |
136 _dragEnd : function() { | |
137 var oElem = DragHandler._oElem; | |
138 var x = parseInt(oElem.style.left); | |
139 var y = parseInt(oElem.style.top); | |
140 document.onmousemove = null; | |
141 document.onmouseup = null; | |
142 DragHandler._oElem = null; | |
143 } | |
144 | |
145 }; | |
146 | |
147 function addLoadEvent(func) { | |
148 var oldonload = window.onload; | |
149 if (typeof window.onload != 'function') { | |
150 window.onload = func; | |
151 } else { | |
152 window.onload = function() { | |
153 if (oldonload) { | |
154 oldonload(); | |
155 } | |
156 func(); | |
157 } | |
158 } | |
159 } | |
160 | |
161 addLoadEvent(function() { | |
162 beginScript(); | |
163 }); | |
164 | |
165 function writeMiniDisplay(title,str) { | |
166 $('#miniDisplayBody')[0].innerHTML = str; | |
167 if(title) { | |
168 $('#miniDisplayTitle')[0].innerHTML = title; | |
169 } | |
170 } | |
171 | |
172 function writeJSONDataToMiniDisplay(jsonObj) { | |
173 var str = ""; | |
174 for (var key in jsonObj.property) { | |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
175 if (key != 'edgeInfo' ) { |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
176 str = str + key + ": "+ jsonObj.property[key] + "<br>"; |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
177 } |
0 | 178 } |
179 writeMiniDisplay(jsonObj.property.title, str); | |
180 } | |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
181 |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
182 function getTraverseDivTemplate(kind, inNum, outNum) { |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
183 return "<div><label id='traverseLabel'><input type='checkbox' checked value='"+kind+"'/>"+kind+"</label><br>in:"+inNum+" out:"+outNum+"</div>"; |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
184 } |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
185 |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
186 function createTraverseView(info) { |
5
db93a718f393
modified traverseTemplate
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
187 var viewHtml = ""; |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
188 for (var kind in info) { |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
189 var data = info[kind]; |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
190 var inNum = 0; |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
191 var outNum = 0; |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
192 if (data['in']) { |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
193 inNum = data['in']; |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
194 } |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
195 if (data['out']) { |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
196 outNum = data['out']; |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
197 } |
5
db93a718f393
modified traverseTemplate
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
198 viewHtml = viewHtml + getTraverseDivTemplate(kind, inNum, outNum); |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
199 } |
5
db93a718f393
modified traverseTemplate
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
200 return viewHtml; |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
201 } |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
202 |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
203 function createEdgeInfoView(node) { |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
204 var id = node.property.id; |
5
db93a718f393
modified traverseTemplate
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
205 var edgeInfo = node.property.edgeInfo; |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
206 var str = ""; |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
207 var info = {}; |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
208 for (var i=0; i<edgeInfo.length; i++) { |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
209 var kind = edgeInfo[i].kind; |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
210 var dir = edgeInfo[i].direction; |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
211 var num = edgeInfo[i].num; |
6
a4323051f7af
output to traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
5
diff
changeset
|
212 info[kind] = {}; |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
213 info[kind][dir] = num; |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
214 } |
5
db93a718f393
modified traverseTemplate
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
215 var viewHTML = createTraverseView(info); |
db93a718f393
modified traverseTemplate
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
216 edgeInfo.viewHtml = viewHTML; |
db93a718f393
modified traverseTemplate
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
217 $('#traverseDisplayBody')[0].innerHTML = viewHTML; |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
218 } |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
219 |
0 | 220 function init() { |
221 jsPlumb.importDefaults({ | |
222 Connector : [ "Straight", { curviness:50 } ], | |
223 PaintStyle : { strokeStyle:"gray", lineWidth:2 }, | |
224 EndpointStyle : {}, | |
225 Anchors: ["BottomCenter","TopCenter"], | |
226 }); | |
227 var rootDiv = $('#graphMain'); | |
228 var rootLeft = rootDiv.offset().left; | |
229 var rootTop = rootDiv.offset().top; | |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
230 $('#traverseDisplay').css( { |
0 | 231 left: rootLeft, |
232 top: rootTop | |
233 }); | |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
234 var heightStr = $('#traverseDisplay').css('height').split('px')[0]; |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
235 var height = parseInt(heightStr); |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
236 $('#miniDisplay').css( { |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
237 left: rootLeft, |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
238 top: rootTop + height + 50 |
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
239 }); |
0 | 240 } |
241 | |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
242 function showMiniDisplay(node) { |
0 | 243 $("#miniDisplay").css("visibility", "visible"); |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
244 writeJSONDataToMiniDisplay(node); |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
245 } |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
246 |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
247 function showTraverseDisplay(node) { |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
248 this.id = node.property.id; |
5
db93a718f393
modified traverseTemplate
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
249 if (!node.property.edgeInfo) { console.log("not found node.edgeInfo "); return; } |
db93a718f393
modified traverseTemplate
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
250 if (!node.property.edgeInfo.viewHtml) { |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
251 createEdgeInfoView(node); |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
252 } |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
253 $('#traverseDisplayBody')[0].innerHTML = node.property.edgeInfo.viewHtml; |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
254 $("#traverseDisplay").css("visibility", "visible"); |
0 | 255 } |
256 | |
257 var nodeNum = 0; | |
7
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
258 var OFFSET = 200; |
0 | 259 var miniD = $('#miniDisplay')[0].style; |
260 var offsetLeft = parseInt(miniD.width.split('px')[0]); | |
261 var offsetTop = parseInt(miniD.height.split('px')[0]); | |
262 function calcNewNodePosition() { | |
263 var position = {}; | |
7
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
264 position = {x: offsetLeft, y: nodeNum*OFFSET + offsetTop / 3}; |
0 | 265 nodeNum++; |
266 return position; | |
267 } | |
268 | |
269 /* | |
270 * | |
271 */ | |
272 function clickNodeDiv(id) { | |
273 var graphData = GRAPH_DATA; | |
274 var node = graphData.nodes[id]; | |
275 var rels = {evidence:1, | |
276 dependency:1, | |
277 derived:1, | |
278 version:1, | |
279 agreement:1}; | |
280 showRelationNodes(graphData, node, rels); | |
281 } | |
282 | |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
283 function addEdgeInfo(id, kind, direction) { |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
284 var nodes = GRAPH_DATA.nodes; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
285 var edges = GRAPH_DATA.edges; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
286 |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
287 } |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
288 |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
289 function getEvidence(id, kind, direction) { |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
290 $.ajax({ |
9
35ee0b1d8719
modfied getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
291 url:"/aat/aaevidencesiftingmodel.userdesktops/get?id="+id+"?kind="+kind+"?direction="+direction, |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
292 success:function(o) { parseJSONGraphData(GRAPH_DATA, o); }, |
9
35ee0b1d8719
modfied getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
8
diff
changeset
|
293 type:"GET", cache:false, |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
294 error:function(o) { console.log("getEvidence error : ", o); } |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
295 }); |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
296 } |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
297 |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
298 function traverseAction() { |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
299 var inDirChecked = $('#direction_in')[0].checked; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
300 var outDirChecked = $('#direction_out')[0].checked; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
301 var labelTags = $('[id=traverseLabel]'); |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
302 var kinds = []; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
303 for (var i=0;i<labelTags.length; i++ ) { |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
304 var inputTag = labelTags[i].children[0]; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
305 if (inputTag.checked) { |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
306 kinds.push(inputTag.value); |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
307 } |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
308 } |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
309 var id = this.id; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
310 for (var i=0; i<kinds.length; i++) { |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
311 var kind = kinds[i]; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
312 if (inDirChecked) getEvidence(id, kind, "in"); |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
313 if (outDirChecked) getEvidence(id, kind, "out"); |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
314 } |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
315 |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
316 } |
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
317 |
0 | 318 function createNodeDiv(node) { |
319 node.view = $("<div class='graphNode'/>"); | |
320 node.view.click(function(){ clickNodeDiv(node.property.id) }); | |
321 if(!node.position) node.position = calcNewNodePosition(); | |
322 node.view.hover(); | |
323 var div = $("<div class='graphNodeContent' />")[0]; | |
324 div.innerHTML = node.property.title; | |
325 node.view[0].appendChild(div); | |
326 return node; | |
327 } | |
328 | |
329 function updateNodeElement(node) { | |
330 var created = false; | |
331 if(!node.view) { | |
332 created = true; | |
333 createNodeDiv(node); | |
334 } | |
335 var div = node.view; | |
336 // div.text(node.property.title); | |
4
810e406abb71
add traverseLabel
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
3
diff
changeset
|
337 div.click(function(){showMiniDisplay(node); showTraverseDisplay(node);}); |
10
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
338 DragHandler.attach($(node.view)[0], node.property.id); |
0 | 339 var kindBackground = {agree:"#aaf", rejected:"#fff"}; |
340 var kindBorder = {agree:"#66a", rejected:"#a66"}; | |
341 div.css("background", kindBackground[node.kind]||"white"); | |
342 div.css("border-color", kindBorder[node.kind] ||"#58f"); | |
343 div.css({ | |
344 left: node.position.x, | |
345 top: node.position.y | |
346 }); | |
347 return created; | |
348 } | |
349 | |
350 | |
351 function updateNode(node) { | |
352 if(updateNodeElement(node)) { | |
353 var fc = $('#graphRoot')[0].firstChild; | |
354 if(fc) { | |
355 $('#graphRoot')[0].insertBefore(node.view[0], fc); | |
356 } else { | |
357 $('#graphRoot').append(node.view); | |
358 } | |
359 } | |
360 } | |
361 | |
362 var ViewParam = { | |
363 offsetTop:100, | |
364 offsetBottom:100, | |
365 offsetLeft:100, | |
366 offsetRight:100, | |
367 nodeWidth:120, | |
368 nodeHeight:60, | |
369 intervalX:140, | |
370 intervalY:120 | |
371 }; | |
372 | |
373 | |
374 function Edge(fromNode, toNode, relation) { | |
375 var obj = {from:fromNode, to:toNode, rel:relation }; | |
376 return obj; | |
377 } | |
378 | |
379 var arrowConnector = { | |
380 connector:"StateMachine", | |
381 // paintStyle:{lineWidth:3,strokeStyle:"#056"}, | |
382 paintStyle:{lineWidth:2,strokeStyle:"#aaf"}, | |
383 hoverPaintStyle:{strokeStyle:"#dbe300"}, | |
384 endpoint:"Blank", | |
385 anchor:"Continuous", | |
386 overlays:[ ["PlainArrow", {location:1, width:20, length:12} ]] | |
387 }; | |
388 | |
389 var arrowBothConnector = { | |
390 connector:"StateMachine", | |
391 paintStyle:{lineWidth:2,strokeStyle:"#aaf"}, | |
392 hoverPaintStyle:{strokeStyle:"#dbe300"}, | |
393 endpoint:"Blank", | |
394 }; | |
395 | |
396 function parseJSONGraphData(memory ,jsonObj) { | |
397 var nodes = jsonObj.nodes; | |
398 for (var i=0; i<nodes.length; i++) { | |
399 var node = nodes[i]; | |
400 memory.nodes[node.id] = {}; | |
401 memory.nodes[node.id].in = []; | |
402 memory.nodes[node.id].out = []; | |
403 memory.nodes[node.id].both = []; | |
404 memory.nodes[node.id].property = node; | |
405 } | |
10
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
406 if (!jsonObj.edges) return memory; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
407 var edges = jsonObj.edges; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
408 for (var i=0; i<edges.length; i++) { |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
409 var edge = edges[i]; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
410 var edgeId = edge.id; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
411 memory.edges[edgeId] = {}; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
412 memory.edges[edgeId].property = edge; |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
413 if (edge.kind == "both") { |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
414 memory.nodes[edge.from].both.push(edgeId); |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
415 memory.nodes[edge.to].both.push(edgeId); |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
416 } else { |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
417 memory.nodes[edge.from].out.push(edgeId); |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
418 memory.nodes[edge.to].in.push(edgeId); |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
419 } |
3fa1be92ab48
modified update node.position
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
9
diff
changeset
|
420 } |
0 | 421 return memory; |
422 } | |
423 | |
424 function showEdge(graphData, edge) { | |
425 function connectEdge(fromNode, toNode, rel, type) { | |
426 var c; | |
427 if (type == 'both') { | |
428 c = jsPlumb.connect({source:fromNode.view[0], target:toNode.view[0]}, arrowBothConnector); | |
429 } else { | |
430 c = jsPlumb.connect({source:fromNode.view[0], target:toNode.view[0]}, arrowConnector); | |
431 } | |
432 // jsPlumb.select({source:fromNode.view[0]}).removeAllOverlays(); | |
433 c.setLabel({label:"<span style='color:#129; font-size:1.5em;'>"+rel+"</span>",cssStyle:""}); | |
434 return c; | |
435 } | |
436 if (edge.visible) return; | |
437 var fromNode = graphData.nodes[edge.property.from]; | |
438 var toNode = graphData.nodes[edge.property.to]; | |
439 if (!fromNode.view && !toNode.view) return; | |
440 var rel = edge.property.rel; | |
441 var type = edge.property.type; | |
442 connectEdge(fromNode, toNode, rel, type); | |
443 edge.visible = true; | |
444 } | |
445 | |
446 function createNodeFromEdge(graphData, edge, baseNode) { | |
447 if(edge.visible) return; | |
448 var fromNode = graphData.nodes[edge.property.from]; | |
449 if (!fromNode.view) { | |
450 updateNode(fromNode); | |
451 } | |
452 var toNode = graphData.nodes[edge.property.to]; | |
453 if (!toNode.view) { | |
454 updateNode(toNode); | |
455 } | |
456 showEdge(graphData, edge); | |
457 } | |
458 | |
459 function getRelationEdgeIds(node) { | |
460 var edgeIds = []; | |
461 for (var i=0; i<node.in.length; i++) edgeIds.push(node.in[i]); | |
462 for (var i=0; i<node.out.length; i++) edgeIds.push(node.out[i]); | |
463 for (var i=0; i<node.both.length; i++) edgeIds.push(node.both[i]); | |
464 return edgeIds; | |
465 } | |
466 | |
467 function getRelationNodeIds(graphData, node) { | |
468 var nodes = graphData.nodes; | |
469 var edges = graphData.edges; | |
470 var nodeIds = []; | |
471 for (var i=0; i<node.in.length; i++) { | |
472 var edgeId = node.in[i]; | |
473 nodeIds.push(edges[edgeId].property.from); | |
474 } | |
475 for (var i=0; i<node.out.length; i++) { | |
476 var edgeId = node.out[i]; | |
477 nodeIds.push(edges[edgeId].property.to); | |
478 } | |
479 for (var i=0; i<node.both.length; i++) { | |
480 var edgeId = node.both[i]; | |
481 var fromId = edges[edgeId].property.from; | |
482 var toId = edges[edgeId].property.to; | |
483 if (fromId == node.property.id) { | |
484 nodeIds.push(toId); | |
485 } else { | |
486 nodeIds.push(fromId); | |
487 } | |
488 } | |
489 return nodeIds; | |
490 } | |
491 | |
492 /* | |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
493 * This function output all NODE that are related [node] |
0 | 494 */ |
495 function updateRelationNodes(graphData, node) { | |
496 var id = node.property.id; | |
497 var edges = graphData.edges; | |
498 var edgeIds = getRelationEdgeIds(node); | |
499 for (var i=0; i<edgeIds.length; i++ ) { | |
500 createNodeFromEdge(graphData, edges[edgeIds[i]]); | |
501 } | |
502 jsPlumb.removeAllEndpoints(); | |
503 jsPlumb.draggable($('.graphNode')); | |
504 } | |
505 | |
506 /* | |
507 * rels = {dependency:1, evidence:1}; | |
508 * showRelationNodes(graphData, node, rels); | |
509 */ | |
510 function showRelationNodes(graphData, node, rels) { | |
511 var id = node.property.id; | |
512 var edges = graphData.edges; | |
513 var edgeIds = getRelationEdgeIds(node); | |
514 for (var i=0; i<edgeIds.length; i++) { | |
515 var edge = edges[edgeIds[i]]; | |
516 if (rels[edge.property.rel]) { | |
517 createNodeFromEdge(graphData, edges[edgeIds[i]]); | |
518 } | |
519 } | |
520 jsPlumb.removeAllEndpoints(); | |
521 jsPlumb.draggable($('.graphNode')); | |
522 } | |
523 | |
2
e90546bb87e4
mofidied traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
524 var BASE_THETA = -30; |
0 | 525 var BASE_ANGLE = 180; |
526 var BASE_DISTANCE = 180; | |
527 function calcChildNodePosition(parent, num) { | |
528 var pX = parent.position.x; | |
529 var pY = parent.position.y; | |
530 var deg = BASE_ANGLE - num * BASE_THETA; | |
531 var theta = deg * (Math.PI / 180); | |
532 var cX = pX - (BASE_DISTANCE * Math.cos(theta)); | |
533 var cY = pY - (BASE_DISTANCE * Math.sin(theta)); | |
534 return {x:cX, y:cY}; | |
535 } | |
536 | |
537 function showAllEdge(graphData) { | |
538 var edges = graphData.edges; | |
539 for (var id in edges) { | |
540 showEdge(graphData, edges[id]); | |
541 } | |
542 jsPlumb.removeAllEndpoints(); | |
543 jsPlumb.draggable($('.graphNode')); | |
544 } | |
545 | |
546 var EDGE_LIST = { | |
547 evidence:'evidence', | |
548 dependency:'dependency', | |
549 version:'version', | |
550 derived:'derived', | |
551 agreement:'agreement' | |
552 }; | |
553 | |
554 function recursiveCalcPosition(graphData, parentNode) { | |
555 if (!parentNode.position) updateNode(parentNode); | |
556 childNodeIds = getRelationNodeIds(graphData, parentNode); | |
557 /* calcration of childNode position */ | |
558 var numCalcChild = 0; | |
559 var childArray = {}; | |
560 for (var i=0; i<childNodeIds.length; i++) { | |
561 var id = childNodeIds[i]; | |
562 var childNode = graphData.nodes[id]; | |
563 childArray[id] = childNode; | |
564 if (!childNode.position) { | |
565 childNode.position = calcChildNodePosition(parentNode, numCalcChild); | |
566 numCalcChild++; | |
567 } | |
568 } | |
569 /* calcration of grandchildNode position */ | |
570 for (var id in childArray) { | |
571 var childNode = childArray[id]; | |
572 var grandChildIds = getRelationNodeIds(graphData, childNode); | |
573 for (var i=0; i<grandChildIds.length; i++) { | |
574 var gId = grandChildIds[i]; | |
575 var grandChild = graphData.nodes[gId]; | |
576 if (!grandChild.position) { | |
577 recursiveCalcPosition(graphData, childNode); | |
578 } | |
579 } | |
580 } | |
581 } | |
582 | |
583 var GRAPH_DATA = new GraphData(); | |
584 var rootNode = {}; | |
7
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
585 function startUserDesktopUI() { |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
586 function showFirstEvidenceList(graphData) { |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
587 var nodes = graphData.nodes; |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
588 for (var id in nodes) { |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
589 updateNode(nodes[id]); |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
590 } |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
591 } |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
592 var graphData = GRAPH_DATA; |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
593 showFirstEvidenceList(graphData); |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
594 } |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
595 |
0 | 596 function testStart() { |
597 init(); | |
6
a4323051f7af
output to traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
5
diff
changeset
|
598 var graphData = parseJSONGraphData(GRAPH_DATA, sampleData); |
7
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
599 startUserDesktopUI(); |
0 | 600 } |
601 | |
8
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
602 $(function() { |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
603 userName = localStorage.userName; |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
604 testStart(); |
07191a24a9a4
modified getEvidence function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
7
diff
changeset
|
605 }) |
0 | 606 |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
607 |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
608 edgeInfo1 = [ |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
609 { |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
610 kind:"collected", |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
611 direction:"in", |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
612 num:"2" |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
613 }, |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
614 { |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
615 kind:"reject", |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
616 direction:"out", |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
617 num:"1" |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
618 } |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
619 ]; |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
620 |
7
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
621 edgeInfo2 = [ |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
622 { |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
623 kind:"collected", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
624 direction:"in", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
625 num:"1" |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
626 } |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
627 ]; |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
628 |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
629 sampleData = { |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
630 nodes: [ |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
631 { |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
632 id:"1", |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
633 title:"context1", |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
634 createdUser:"oshiro", |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
635 edgeInfo:edgeInfo1 |
7
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
636 }, |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
637 { |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
638 id:"2", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
639 title:"context2", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
640 content:"content", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
641 createUser:"tamayose", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
642 edgeInfo:edgeInfo2 |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
643 } |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
644 ] |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
645 }; |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
646 |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
647 /* id 1 select direction in and kind collected */ |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
648 sampleData2 = { |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
649 nodes: [ |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
650 { |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
651 id:"3", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
652 title:"id 3", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
653 createUser:"kinjo", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
654 edgeInfo:edgeInfo1 |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
655 }, |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
656 { |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
657 id:"4", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
658 title:"id 4", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
659 createUser:"oshiro", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
660 edgeInfo:edgeInfo2 |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
661 } |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
662 ] |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
663 }; |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
664 |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
665 /* id 1 select direction out and kind reject */ |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
666 sampleData3 = { |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
667 nodes: [ |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
668 { |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
669 id:"6", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
670 title:"id 6", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
671 createUser:"kinjo", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
672 edgeInfo:edgeInfo1 |
1
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
673 } |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
674 ] |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
675 }; |
a3fdabc0613e
create traverseDisplay
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
0
diff
changeset
|
676 |
7
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
677 /* id 2 select direction in and kind collected */ |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
678 sampleData4 = { |
0 | 679 nodes: [ |
680 { | |
681 id:"5", | |
7
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
682 title:"id 5", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
683 createUser:"user 5", |
29db6ff1d63e
create startUserDesktopUI function
Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
parents:
6
diff
changeset
|
684 edgeInfo:edgeInfo2 |
0 | 685 } |
686 ] | |
687 }; | |
688 | |
689 </script> | |
690 |