From 078094e7797d59608efc8017739562331aa06aaa Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Fri, 29 Dec 2017 20:51:06 +0100 Subject: [PATCH] Reduce opacity of lines when in background --- js/diagrams.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/diagrams.js b/js/diagrams.js index a7fb42c..b5bf709 100644 --- a/js/diagrams.js +++ b/js/diagrams.js @@ -203,12 +203,12 @@ function createLineGraph(containerId, raceData){ function handleClickOnPoint(d,i){ //select elements that are highlightable but are not highlighted d3.selectAll("[data-opacitychange='" + 1 +"'][data-highlighted='" + 0 +"']") - .style("opacity", 0.3); + .style("opacity", 0.10); // if clicked on already highlighted line, remove highlight if(this.getAttribute("data-highlighted") == 1){ d3.selectAll("[data-line='" + d.driverId +"'][data-opacitychange='" + 1 +"']") - .style("opacity", 0.3); + .style("opacity", 0.10); d3.selectAll("[data-line='" + d.driverId +"']") .attr("data-highlighted", 0);