Commit cf28677a authored by Romain Loth's avatar Romain Loth

param adjustments

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