Commit 7e263594 authored by Romain Loth's avatar Romain Loth

optimized settings so far + remarks

parent 435ca68c
......@@ -100,7 +100,7 @@ var semanticConverged=false;
var showLabelsIfZoom=1.0;
TW.edgeDefaultOpacity = 0.3 // opacity when true_color
TW.edgeGreyColor = "rgba(200, 200, 200, 0.5)";
TW.overSampling = false // costly hi-def rendering (true => pixelRatio x 2)
TW.overSampling = true // costly hi-def rendering (true => pixelRatio x 2)
// ============ < / DEVELOPER OPTIONS > ============
......
......@@ -217,20 +217,29 @@ if(RES["OK"]) {
TW.graphData = {nodes: [], edges: []}
TW.graphData = sigma_utils.FillGraph( initialState , catDict , dicts.nodes , dicts.edges , TW.graphData );
// cf github.com/jacomyal/sigma.js/wiki/Settings
var customSettings = Object.assign(
{
drawEdges: true,
drawNodes: true,
drawLabels: true,
// nodesPowRatio: .1,
labelSize: "proportional",
font: "Ubuntu Condensed",
fontStyle: "bold",
// labelColor: "node",
// fontStyle: "bold",
// nodesPowRatio: .3,
batchEdgesDrawing: true,
hideEdgesOnMove: true,
enableHovering: true,
singleHover: true,
enableEdgeHovering: false,
autoResize: true,
rescaleIgnoreSize: true,
mouseEnabled: true,
touchEnabled: false
},
......@@ -256,6 +265,7 @@ if(RES["OK"]) {
// - additionnaly supports 'forcelabel' node property
sigma.canvas.labels.def = sigma_utils.twRender.canvas.labels.def
// ==================================================================
// sigma js library invocation (https://github.com/jacomyal/sigma.js)
// ==================================================================
......
......@@ -130,7 +130,7 @@ SigmaUtils = function () {
};
// source: github.com/jacomyal/sigma.js/commit/25e2153
// POSS: modify to incorporate mix colors
// POSS: modify to incorporate mix colors (repaintEdges)
this.twRender.canvas.edges.curve = function(edge, source, target, context, settings) {
var color = edge.color,
prefix = settings('prefix') || '',
......@@ -202,6 +202,7 @@ SigmaUtils = function () {
context.fill();
};
// ================ /alternative rendering =====================
this.toggleEdges = function() {
var now_flag = TW.partialGraph.settings('drawEdges')
......@@ -209,15 +210,12 @@ SigmaUtils = function () {
TW.partialGraph.render()
}
// ================ /alternative rendering =====================
}
} // /SigmaUtils object
//for socialgraph
function showMeSomeLabels(N){
// NB why is this not using methods.manualForceLabel ?!
/*======= Show some labels at the beginning =======*/
minIn=50,
maxIn=0,
......
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