From 0feed1236c330ee5f76c7e3e9e6678dec227052c Mon Sep 17 00:00:00 2001 From: Jan Philipp Timme Date: Sun, 31 Dec 2017 14:42:39 +0100 Subject: [PATCH] Fix endpoints in context view a bit --- js/diagrams.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/diagrams.js b/js/diagrams.js index af9dd7d..390b64f 100644 --- a/js/diagrams.js +++ b/js/diagrams.js @@ -266,8 +266,8 @@ function createLineGraph(containerId, raceData){ .attr("data-highlighted", 0) .attr("data-elemtype", elemTypes.endpoint) .attr("fill", getColorValue(driverIndex, enhancedLapData.length)) - .attr("x", function(d, i) { return x2(d.lap) - rectSize * 1/2; }) - .attr("y", function(d, i) { return y2(d.position) - rectSize * 1/2; }) + .attr("x", function(d, i) { return x2(d.lap) - rectSize * 1/4; }) + .attr("y", function(d, i) { return y2(d.position) - rectSize * 1/4; }) .attr("height", rectSize * 0.4) .attr("width", rectSize * 0.4) .attr("d", lineDataDefinition);