From 4180d54aef2022f0f5e75e9e300e6b427d331d5a Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 1 Apr 2016 17:37:17 +0200 Subject: fix colors and descriptions --- code/weightvis.js | 12 ++++++------ index.css | 2 ++ index.html | 8 ++++---- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/code/weightvis.js b/code/weightvis.js index 409eb90..10a9ed2 100644 --- a/code/weightvis.js +++ b/code/weightvis.js @@ -20,17 +20,16 @@ var primaryColor = [pDeepPurple[1], pDeepPurple[5], pDeepPurple[7]], secondaryColor = pBlueA[3], - tertiaryColor = [pPink[1], pPink[5], pPink[7]], themeColor = pLight, accentColor = secondaryColor, bgColor = themeColor[3], - linkColor = primaryColor[0], - linkColorAlt = tertiaryColor[0], - linkHighlightColor = primaryColor[1], - linkHighlightColorAlt = tertiaryColor[1], - nodeColor = textColor[0], + linkColor = pDeepPurple[2], + linkColorAlt = pPink[2], + linkHighlightColor = pDeepPurple[5], + linkHighlightColorAlt = pPink[5], + nodeColor = pDeepPurple[4], nodeHighlightColor = accentColor ; @@ -341,6 +340,7 @@ var Visualizer = (function() { }; Visualizer.prototype.reposition = function() { + if (!this.svg) return; var width = parseInt(this.svg.style("width")) || 800, height = parseInt(this.svg.style("height")) || 600; var node = this.svg.selectAll(".node"); diff --git a/index.css b/index.css index d863e90..7083fca 100644 --- a/index.css +++ b/index.css @@ -21,6 +21,8 @@ time, mark, audio, video { } .svgContainer { + margin-top: 1.5em; + margin-bottom: 1.5em; height: 70%; } diff --git a/index.html b/index.html index c1858fd..fb88382 100644 --- a/index.html +++ b/index.html @@ -71,8 +71,8 @@ var attrFontSize = 20; function placeAttributes() { - var inputNodes = d3.selectAll(".layer-1").node(); - var attrs = d3.selectAll(".attribute").node(); + var inputNodes = d3.selectAll(".layer-1")[0]; + var attrs = d3.selectAll(".attribute")[0]; for (node=0; node