From 7830d8da5b25508d2cd6642dd27878de75dd111d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laura=20Kl=C3=BCnder?= Date: Sun, 6 Aug 2017 17:14:55 +0200 Subject: [PATCH] fix arrow rendering with new line width --- src/c3nav/editor/static/editor/js/editor.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/c3nav/editor/static/editor/js/editor.js b/src/c3nav/editor/static/editor/js/editor.js index bf2bde1e..41193da8 100644 --- a/src/c3nav/editor/static/editor/js/editor.js +++ b/src/c3nav/editor/static/editor/js/editor.js @@ -402,7 +402,7 @@ editor = { for(var i=0;i'); + defs.insertAdjacentHTML('beforeend', ''); } } @@ -429,8 +429,8 @@ editor = { layer.setStyle({weight: weight}); } if (layer.feature.properties.type === 'graphedge') { - var start_pos = 0.4, - end_pos = layer.length-0.4, + var start_pos = 0.1, + end_pos = layer.length-0.1, color_index = editor._arrow_colors.indexOf(layer._path.getAttribute('stroke')); other = (editor._graph_edges_to[layer.feature.properties.from_node] !== undefined) ? editor._graph_edges_to[layer.feature.properties.from_node][layer.feature.properties.to_node] : undefined; if (color_index === -1) { @@ -441,7 +441,7 @@ editor = { start_pos = layer.length/2-0.01; } if (other === undefined || layer._path.getAttribute('stroke') !== other._path.getAttribute('stroke')) { - end_pos = layer.length-1; + end_pos = layer.length-0.3; layer._path.setAttribute('marker-end', 'url(#graph-edge-arrow-'+String(color_index)+')'); } layer.setStyle({