Commit cf28677a authored by Romain Loth's avatar Romain Loth

param adjustments

parent 404be1d5
...@@ -49,7 +49,7 @@ var TW = {} ...@@ -49,7 +49,7 @@ var TW = {}
TW.DivsFlags["histogramModule"] = false ; TW.DivsFlags["histogramModule"] = false ;
TW.DivsFlags["histogramDailyVariantModule"] = false ; TW.DivsFlags["histogramDailyVariantModule"] = false ;
// TODO more generic module integrating the variants cf. experiments/histogramModule_STUB_GENERIQUE // TODO more generic module integrating the variants cf. experiments/histogramModule_STUB_GENERIQUE
TW.DivsFlags["crowdsourcingModule"] = true ; TW.DivsFlags["crowdsourcingModule"] = false ;
TW.SystemStates = {} TW.SystemStates = {}
TW.SystemStates.level = true; TW.SystemStates.level = true;
...@@ -110,10 +110,10 @@ TW.filterSliders = true ...@@ -110,10 +110,10 @@ TW.filterSliders = true
TW.histogramStartThreshold = 10 ; TW.histogramStartThreshold = 10 ;
TW.defaultNodeColor = "rgb(40,40,40)" TW.defaultNodeColor = "rgb(40,40,40)"
TW.edgeDefaultOpacity = 0.5 // opacity when true_color TW.edgeDefaultOpacity = 0.4 // opacity when true_color
TW.edgeGreyColor = "rgba(150, 150, 150, 0.2)"; TW.edgeGreyColor = "rgba(150, 150, 150, 0.5)";
TW.nodesGreyBorderColor = "rgba(100, 100, 100, 0.5)"; TW.nodesGreyBorderColor = "rgba(100, 100, 100, 0.5)";
TW.selectedColor = "node" // "node" for a background like the node's color, TW.selectedColor = "default" // "node" for a background like the node's color,
// "default" for note-like yellow // "default" for note-like yellow
TW.overSampling = true // costly hi-def rendering (true => pixelRatio x 2) TW.overSampling = true // costly hi-def rendering (true => pixelRatio x 2)
...@@ -146,7 +146,7 @@ TW.ourRendering = true ; ...@@ -146,7 +146,7 @@ TW.ourRendering = true ;
var sigmaJsDrawingProperties = { var sigmaJsDrawingProperties = {
defaultLabelColor: 'black', defaultLabelColor: 'black',
defaultLabelSize: 30, // in fact usually overridden by node data... defaultLabelSize: 30, // in fact usually overridden by node data...
labelSizeRatio: 1.5, // ...but this ratio allows truly adjusting the sizes labelSizeRatio: 1, // ...but this ratio allows truly adjusting the sizes
labelThreshold: 5, labelThreshold: 5,
defaultEdgeType: 'curve', // 'curve' or 'line' defaultEdgeType: 'curve', // 'curve' or 'line'
...@@ -171,8 +171,8 @@ var sigmaJsDrawingProperties = { ...@@ -171,8 +171,8 @@ var sigmaJsDrawingProperties = {
fontStyle: "bold", fontStyle: "bold",
}; };
var sigmaJsGraphProperties = { var sigmaJsGraphProperties = {
minEdgeSize: 2, minEdgeSize: 3,
maxEdgeSize: 4 // maxEdgeSize: 10
}; };
var sigmaJsMouseProperties = { var sigmaJsMouseProperties = {
minRatio: .03125, // 1/32 pour permettre zoom x32 minRatio: .03125, // 1/32 pour permettre zoom x32
......
...@@ -989,7 +989,7 @@ TinaWebJS = function ( sigmacanvas ) { ...@@ -989,7 +989,7 @@ TinaWebJS = function ( sigmacanvas ) {
//finished //finished
var labelSizeTimeout = null var labelSizeTimeout = null
$("#sliderlabelsize").freshslider({ $("#sliderlabelsize").freshslider({
step:.5, step:.25,
min:0, min:0,
max:5, max:5,
value: TW.partialGraph.settings('labelSizeRatio'), value: TW.partialGraph.settings('labelSizeRatio'),
......
...@@ -81,6 +81,7 @@ function jsActionOnGexfSelector(gexfBasename , db_json){ ...@@ -81,6 +81,7 @@ function jsActionOnGexfSelector(gexfBasename , db_json){
// show the custom name of the app // show the custom name of the app
writeBrand(TW.branding) writeBrand(TW.branding)
console.log("Starting TWJS")
// === [ what to do at start ] === // // === [ what to do at start ] === //
// --------------------- choosing the input ------------------------------------ // --------------------- choosing the input ------------------------------------
...@@ -570,11 +571,11 @@ else { ...@@ -570,11 +571,11 @@ else {
console.log("printing the typestring:", typestring) console.log("printing the typestring:", typestring)
if (TW.filterSliders) { if (TW.filterSliders
&& (present.level != past.level
|| present.type.map(Number).join("|") != past.type.map(Number).join("|"))) {
// recreate sliders after perimeter changes // recreate sliders after type, level changes
// £TODO fix conditions (was if #slider.html == '' or if level changed)
// atm on any state change
// terms // terms
if(typestring=="0|1") { if(typestring=="0|1") {
...@@ -621,15 +622,15 @@ else { ...@@ -621,15 +622,15 @@ else {
TW.FA2Params = { TW.FA2Params = {
// adapting speed ------------- // adapting speed -------------
slowDown: 1.5, slowDown: 1.5,
startingIterations: 5, startingIterations: 2, // keep it an even number to reduce visible oscillations at rendering
iterationsPerRender: 3, iterationsPerRender: 4, // idem
barnesHutOptimize: false, barnesHutOptimize: false,
// barnesHutTheta: .5, // barnesHutTheta: .5,
// global behavior ----------- // global behavior -----------
linLogMode: true, linLogMode: true,
edgeWeightInfluence: .5, edgeWeightInfluence: .3,
gravity: 1, gravity: .8,
strongGravityMode: false, strongGravityMode: false,
scalingRatio: 1, scalingRatio: 1,
...@@ -647,8 +648,8 @@ else { ...@@ -647,8 +648,8 @@ else {
// init noverlap for any future calls // init noverlap for any future calls
TW.partialGraph.configNoverlap({ TW.partialGraph.configNoverlap({
nodeMargin: .3, nodeMargin: .4,
scaleNodes: 1.2, scaleNodes: 1.5,
gridSize: 400, gridSize: 400,
speed: 5, speed: 5,
maxIterations: 10, maxIterations: 10,
...@@ -658,10 +659,13 @@ else { ...@@ -658,10 +659,13 @@ else {
}); });
// REFA new sigma.js // REFA new sigma.js
TW.partialGraph.camera.goTo({x:0, y:0, ratio:0.5, angle: 0}) TW.partialGraph.camera.goTo({x:0, y:0, ratio:0.9, angle: 0})
twjs_.initListeners(TW.categories , TW.partialGraph); twjs_.initListeners(TW.categories , TW.partialGraph);
// mostly json data are extracts provided by DB apis => no positions
if (inFormat == "json") fa2enabled = true
// run fa2 if settings_explorerjs.fa2enabled == true // run fa2 if settings_explorerjs.fa2enabled == true
if (fa2enabled) { if (fa2enabled) {
TW.partialGraph.startForceAtlas2(); TW.partialGraph.startForceAtlas2();
......
...@@ -722,7 +722,7 @@ function prepareNodesRenderingProperties(nodesDict) { ...@@ -722,7 +722,7 @@ function prepareNodesRenderingProperties(nodesDict) {
grey: false, grey: false,
highlight: false, highlight: false,
true_color : n.color, true_color : n.color,
defgrey_color : "rgba("+rgbStr+",.5)" defgrey_color : "rgba("+rgbStr+",.35)"
} }
// POSS n.type: distinguish rendtype and twtype // POSS n.type: distinguish rendtype and twtype
......
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