diff --git a/settings_explorerjs.js b/settings_explorerjs.js index f0ea0dd00821ae7e0ae59517cde16c9c03654346..4f0f0e52c87df0152585c680515fd42d5ec47e59 100755 --- a/settings_explorerjs.js +++ b/settings_explorerjs.js @@ -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 > ============ diff --git a/tinawebJS/main.js b/tinawebJS/main.js index 16f5b2505a00e9ef675d7c84123424d8b9af45e7..33a598aff55be275db2740bbad96063d4134dc38 100755 --- a/tinawebJS/main.js +++ b/tinawebJS/main.js @@ -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) // ================================================================== diff --git a/tinawebJS/sigmaUtils.js b/tinawebJS/sigmaUtils.js index 3817cbdbeacf9596ef05b3333f29a82a1f1a82b9..dc7f5deef59e49684cc9e2afdf8aa6ab5f3c3d9f 100755 --- a/tinawebJS/sigmaUtils.js +++ b/tinawebJS/sigmaUtils.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,