Commit 0e9ad95171a25e7a5eebe4bba653b5b5670ebd0c
1 parent
01a6d2e5
graph updates
Showing
2 changed files
with
14 additions
and
7 deletions
datalets/graph-datalet/graph-datalet.html
@@ -57,8 +57,9 @@ Example: | @@ -57,8 +57,9 @@ Example: | ||
57 | <style is="custom-style"> | 57 | <style is="custom-style"> |
58 | 58 | ||
59 | #dialog{ | 59 | #dialog{ |
60 | - position: relative; | 60 | + position: absolute; |
61 | padding: 20px; | 61 | padding: 20px; |
62 | + top: 20px; | ||
62 | right:5%; | 63 | right:5%; |
63 | } | 64 | } |
64 | 65 | ||
@@ -144,7 +145,7 @@ Example: | @@ -144,7 +145,7 @@ Example: | ||
144 | .append("g"); | 145 | .append("g"); |
145 | 146 | ||
146 | //set initial zoom | 147 | //set initial zoom |
147 | - scale = (0.8); | 148 | + scale = (0.87); |
148 | //translate = [(width-scale*width)/2, ((height-scale*height)/4)]; | 149 | //translate = [(width-scale*width)/2, ((height-scale*height)/4)]; |
149 | translate = [0, 0]; | 150 | translate = [0, 0]; |
150 | console.log("w: " + width + " h:" + height); | 151 | console.log("w: " + width + " h:" + height); |
@@ -286,12 +287,19 @@ Example: | @@ -286,12 +287,19 @@ Example: | ||
286 | //return 1 == t.fixed ? 1.4 * t.r : 15 | 287 | //return 1 == t.fixed ? 1.4 * t.r : 15 |
287 | return 1 == t.fixed ? 1.4 * t.r : t.r + 10; | 288 | return 1 == t.fixed ? 1.4 * t.r : t.r + 10; |
288 | }); | 289 | }); |
290 | + | ||
291 | + _this.$.dialog.close(); | ||
292 | + _this.$.dialog_title.innerHTML = t.name; | ||
293 | + _this.$.dialog_content.innerHTML = t.content; | ||
294 | + | ||
295 | + _this.$.dialog.open(); | ||
289 | }, | 296 | }, |
290 | 297 | ||
291 | mouseout : function () { | 298 | mouseout : function () { |
292 | d3.select(this).selectAll("text").style("visibility", "hidden"), d3.select(this).selectAll("circle").transition().duration(400).attr("r", function (t) { | 299 | d3.select(this).selectAll("text").style("visibility", "hidden"), d3.select(this).selectAll("circle").transition().duration(400).attr("r", function (t) { |
293 | return t.r ? t.r : 15 | 300 | return t.r ? t.r : 15 |
294 | }); | 301 | }); |
302 | + _this.$.dialog.close(); | ||
295 | }, | 303 | }, |
296 | 304 | ||
297 | active : function (t) { | 305 | active : function (t) { |
@@ -306,15 +314,15 @@ Example: | @@ -306,15 +314,15 @@ Example: | ||
306 | prev_selected_node.style.fill = "#FFFFFF" | 314 | prev_selected_node.style.fill = "#FFFFFF" |
307 | prev_selected_node.style.stroke = t.color; | 315 | prev_selected_node.style.stroke = t.color; |
308 | 316 | ||
309 | - _this.$.dialog.close(); | 317 | + /* _this.$.dialog.close(); |
310 | _this.$.dialog_title.innerHTML = t.name; | 318 | _this.$.dialog_title.innerHTML = t.name; |
311 | _this.$.dialog_content.innerHTML = t.content; | 319 | _this.$.dialog_content.innerHTML = t.content; |
312 | 320 | ||
313 | - _this.$.dialog.open(); | 321 | + _this.$.dialog.open();*/ |
314 | }, | 322 | }, |
315 | 323 | ||
316 | _onCloseClick : function(){ | 324 | _onCloseClick : function(){ |
317 | - _this.$.dialog.close(); | 325 | + //_this.$.dialog.close(); |
318 | }, | 326 | }, |
319 | 327 | ||
320 | /** | 328 | /** |
datalets/graph-datalet/static/css/graphStyle.css
@@ -8,7 +8,7 @@ circle{ | @@ -8,7 +8,7 @@ circle{ | ||
8 | } | 8 | } |
9 | 9 | ||
10 | .node { | 10 | .node { |
11 | - cursor: move; | 11 | + cursor: pointer; |
12 | fill: #fff; | 12 | fill: #fff; |
13 | stroke: #FFFFFF; | 13 | stroke: #FFFFFF; |
14 | stroke-width: 4.5px | 14 | stroke-width: 4.5px |
@@ -17,7 +17,6 @@ circle{ | @@ -17,7 +17,6 @@ circle{ | ||
17 | 17 | ||
18 | .node.fixed { | 18 | .node.fixed { |
19 | cursor: pointer; | 19 | cursor: pointer; |
20 | - cursor: hand; | ||
21 | stroke-width: 6px | 20 | stroke-width: 6px |
22 | } | 21 | } |
23 | 22 |