From 6594b1a7bfd7541a35d19f952a15a2de832c0cf0 Mon Sep 17 00:00:00 2001 From: Merle Stahl <merle.stahl@studium.uni-hamburg.de> Date: Wed, 15 Dec 2021 14:36:57 +0100 Subject: [PATCH] =?UTF-8?q?aufger=C3=A4umt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Output/README.md | 2 +- Output/graph/cn.js | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Output/README.md b/Output/README.md index e6fa0c0..418fdbe 100644 --- a/Output/README.md +++ b/Output/README.md @@ -35,7 +35,7 @@ Starting a python web server: Access to the server: [http://0.0.0.0/:\<port\>](http://0.0.0.0/:<port>) -## Files in directory +## Files in Directory - **index.html**: webpage - **cn.js**: javascript code for force-directed graph, text elements and legend - **json_text.json**: example data diff --git a/Output/graph/cn.js b/Output/graph/cn.js index 2972d2d..309678b 100644 --- a/Output/graph/cn.js +++ b/Output/graph/cn.js @@ -25,7 +25,7 @@ y_scale = d3.scaleOrdinal() to_remove; /** -* creates node object and default radius +* creates node object and (default) radius */ var node, r = 10; @@ -36,8 +36,7 @@ r = 10; var link; /** -* creates a background -* creates a click functionality of the background +* creates a background with a click functionality */ var rect = svg.append("rect") .attr("x", 0) @@ -143,7 +142,7 @@ d3.json("json_text.json").then(function(graph) { /** * calls update functions for links and nodes -* adds the nodes, links and tick functionailty to the simulation +* adds the nodes, links and tick functionality to the simulation * @param {object} nodes - nodes * @param {object} links - links */ @@ -177,9 +176,8 @@ function update_links(links) { } /** -* initializes and shows nodes with circles and texts +* initializes and shows nodes with circles, texts and a click functionality * creates a new drag behavior and applies it to the circles -* creates a click functionality of the circles and texts * @param {object} nodes - nodes */ function update_nodes(nodes) { -- GitLab