From bcc70a57f68d3b6327751fcdcbb17fad5e5dd4a4 Mon Sep 17 00:00:00 2001 From: Franc Camps-Febrer Date: Sun, 16 Dec 2018 12:09:14 +0100 Subject: [PATCH] Update narrative paths on move, zoom --- src/js/map/map.js | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/js/map/map.js b/src/js/map/map.js index 5de5fbe..2d56977 100644 --- a/src/js/map/map.js +++ b/src/js/map/map.js @@ -160,11 +160,7 @@ Stop and start the development process in terminal after you have added your tok return `translate(${newPoint.x},${newPoint.y})`; }); - const sequenceLine = d3.line() - .x(d => getCoords(d).x + transformX) - .y(d => getCoords(d).y + transformY); - - g.selectAll('.narrative') + svg.selectAll('.narrative') .attr('d', d => sequenceLine(d.steps)); } @@ -237,9 +233,7 @@ Stop and start the development process in terminal after you have added your tok function getLocationEventsDistribution(location) { const eventCount = {}; const categories = domain.categories; - // categories.sort((a, b) => { - // return (+a.slice(-2) > +b.slice(-2)); - // }); + categories.forEach(cat => { eventCount[cat.category] = 0 });