From 06338d606f51c9e8a33167cc992e731e58e130c3 Mon Sep 17 00:00:00 2001 From: Tim Dwyer Date: Fri, 2 May 2014 21:31:40 +1000 Subject: [PATCH] info text --- WebCola/examples/egonetwork.html | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/WebCola/examples/egonetwork.html b/WebCola/examples/egonetwork.html index 3d945936..f3b4dc3f 100644 --- a/WebCola/examples/egonetwork.html +++ b/WebCola/examples/egonetwork.html @@ -18,16 +18,16 @@ } .leftheading { - position: relative; - left: 0px; + position: absolute; + left: 60px; width: 300px; float: left; font-size: 20px; } .rightheading { - position: relative; - left: 30px; + position: absolute; + left: 360px; width: 150px; float: left; font-size: 20px; @@ -60,6 +60,13 @@ font-size: 16px; opacity: 0.5; } + + .info { + position: absolute; + top: 350px; + left: 30px; + width: 500px; + } @@ -76,7 +83,7 @@ var color = d3.scale.category20(); var connected = true; - //var button; + var button; document.onkeyup = keyhandler; function keyhandler(e) { if (e.keyCode === 32) { @@ -90,14 +97,14 @@ egosvg1.restart(); egosvg2.restart(); connected = false; - //button.text("Connect Self"); + button.text("Connect Self"); } else { egosvg1.connectNode0(); egosvg2.connectNode0(); egosvg1.restart(); egosvg2.restart(); connected = true; - //button.text("Disconnect Self"); + button.text("Disconnect Self"); } } @@ -249,14 +256,14 @@ var counter = 0; function allDone() { if (++counter === 2) { - //button = body.append("center").append("button").attr("id", "removeSelfButton").html("Disconnect Self").on("click", disconnectNode0); + button = body.append("center").append("button").attr("id", "removeSelfButton").html("Disconnect Self").on("click", disconnectNode0); body.append("p").html(''); } //body.append("p").html(''); } - +

This is the friend network of a particular person (the red node). Since by definition there is a link from the red node to all the blue nodes (their friends), + there's really no point showing all those links. Therefore, pressing the button removes those links and rearranges the network to tidy it up.