Commit c8e679b7 authored by Romain Loth's avatar Romain Loth

fix edge greying out and expose opacity params

parent 31aeb826
......@@ -93,8 +93,12 @@ var seed=999999999;//defaultseed
var semanticConverged=false;
// ============ < / DEVELOPER OPTIONS > ============
var showLabelsIfZoom=1.0;
var greyColor = "#9b9e9e";
TW.edgeDefaultOpacity = 0.3 // opacity when true_color
TW.edgeGreyColor = "rgba(200, 200, 200, 0.5)";
// ============ < / DEVELOPER OPTIONS > ============
// ============ < SIGMA.JS PROPERTIES > ============
......@@ -133,8 +137,6 @@ var sigmaJsMouseProperties = {
// ============ < / SIGMA.JS PROPERTIES > ============
// ============ < / DEVELOPER OPTIONS > ============
// ============ < VARIABLES.JS > ============
......
......@@ -219,7 +219,7 @@ if(RES["OK"]) {
var customSettings = Object.assign(
{
drawEdges: false, // fixme edgetype curve
drawEdges: true, // fixme edgetype curve
drawNodes: true,
drawLabels: true,
// nodesPowRatio: .5,
......@@ -249,10 +249,10 @@ if(RES["OK"]) {
TW.partialGraph = new sigma({
graph: TW.graphData,
container: 'sigma-example',
renderers: [{
renderer: {
container: document.getElementById('sigma-example'),
type: sigma.renderers.canvas
}],
},
settings: customSettings
});
......
......@@ -20,7 +20,6 @@ function cancelSelection (fromTagCloud) {
// console.log("cancelSelection: edge", e[i])
if (e[i]) {
e[i].color = e[i].customAttrs['grey'] ? e[i].customAttrs['true_color'] : e[i].color;
// e[i].color = e[i].customAttrs['true_color'];
e[i].customAttrs['grey'] = 0;
}
......@@ -541,7 +540,7 @@ function greyEverything(){
for(var i in eds){
if(!eds[i].customAttrs['grey']){
eds[i].customAttrs['true_color'] = eds[i].color;
eds[i].color = greyColor;
eds[i].color = TW.edgeGreyColor ;
}
eds[i].customAttrs['grey'] = 1;
}
......
......@@ -44,7 +44,7 @@ sigmaTools = (function(stools) {
var g = (a[1] + b[1]) >> 1;
var b = (a[2] + b[2]) >> 1;
// var color = '#'+sigma.tools.rgbToHex(parseFloat(r),parseFloat(g),parseFloat(b))
var color = "rgba( "+r+", "+g+" , "+b+" ,0.5)";
var color = "rgba( "+r+", "+g+" , "+b+" , "+TW.edgeDefaultOpacity+")";
return color
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment