From 7b25efda957fce6e8a2fc7354a799786d4d5df92 Mon Sep 17 00:00:00 2001 From: Franc Camps-Febrer Date: Fri, 14 Dec 2018 17:28:28 +0100 Subject: [PATCH] Apply correct narrative styles in map --- src/js/map/map.js | 4 ++-- src/store/initial.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/map/map.js b/src/js/map/map.js index 019a70d..3ae5bed 100644 --- a/src/js/map/map.js +++ b/src/js/map/map.js @@ -395,7 +395,7 @@ Stop and start the development process in terminal after you have added your tok }) .style('stroke-opacity', d => { if (app.narrative === null) return 0; - if (!d[0] || app.narrative.id !== d[0].narrative) return 0.2; + if (!d[0] || !d[0].narratives.find(n => n === app.narrative.id)) return 0.2; return 1; }) .style('fill', 'none'); @@ -408,7 +408,7 @@ Stop and start the development process in terminal after you have added your tok }) .style('stroke-opacity', d => { if (app.narrative === null) return 0; - if (!d[0] || app.narrative.id !== d[0].narrative) return 0.2; + if (!d[0] || !d[0].narratives.find(n => n === app.narrative.id)) return 0.2; return 1; }) } diff --git a/src/store/initial.js b/src/store/initial.js index 11c6e60..3121edc 100644 --- a/src/store/initial.js +++ b/src/store/initial.js @@ -115,7 +115,7 @@ const initial = { narratives: { default: { - style: 'dotted', // ['dotted', 'solid'] + style: 'solid', // ['dotted', 'solid'] opacity: 0.9, // range between 0 and 1 stroke: 'red', // Any hex or rgb code strokeWidth: 3