From 2c886cf02c635b3b65437fd4482f74220ce6ede1 Mon Sep 17 00:00:00 2001 From: Corentin Limier Date: Tue, 1 Oct 2019 10:11:39 +0200 Subject: [PATCH] parameterize edge opacity --- config.js | 1 + js/gexfjs.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/config.js b/config.js index e3dedee..5872a61 100644 --- a/config.js +++ b/config.js @@ -30,6 +30,7 @@ GexfJS.setParams({ Change this parameter for wider or narrower edges this setting can't be changed from the User Interface */ + edgeOpacity : 0.2, minEdgeWidth : 1, maxEdgeWidth : 50, textDisplayThreshold: 9, diff --git a/js/gexfjs.js b/js/gexfjs.js index 78446a5..386eff8 100644 --- a/js/gexfjs.js +++ b/js/gexfjs.js @@ -987,7 +987,7 @@ GexfJS.ctxGraphe.lineWidth = _edgeSizeFactor * _d.W; var _coords = ((GexfJS.params.useLens && GexfJS.mousePosition) ? calcCoord(GexfJS.mousePosition.x, GexfJS.mousePosition.y, _ds.actual_coords) : _ds.actual_coords); _coordt = ((GexfJS.params.useLens && GexfJS.mousePosition) ? calcCoord(GexfJS.mousePosition.x, GexfJS.mousePosition.y, _dt.actual_coords) : _dt.actual_coords); - GexfJS.ctxGraphe.strokeStyle = (_isLinked ? _d.C : "rgba(100,100,100,0.2)"); + GexfJS.ctxGraphe.strokeStyle = (_isLinked ? _d.C : "rgba(100,100,100,"+ GexfJS.params.edgeOpacity.toString() +")"); traceArc(GexfJS.ctxGraphe, _coords, _coordt, _sizeFactor * 3.5, GexfJS.params.showEdgeArrow && _d.d); } }