Commit ab85f4a2 authored by Romain Loth's avatar Romain Loth

minor settings update

parent 6c5c9234
...@@ -37,7 +37,8 @@ ...@@ -37,7 +37,8 @@
<!-- Sahitya & Gurajada <!-- Sahitya & Gurajada
"book" (beautiful quality roman) + devanagari support + telugu --> "book" (beautiful quality roman) + devanagari support + telugu -->
<link href="https://fonts.googleapis.com/css?family=Gurajada|Sahitya" rel="stylesheet"> <link href="https://fonts.googleapis.com/css?family=Gurajada" rel="stylesheet">
<!-- <link href="https://fonts.googleapis.com/css?family=Sahitya" rel="stylesheet"> -->
<!-- Itim <!-- Itim
cursive (refined and very readable but a bit too wide for us) + thai support --> cursive (refined and very readable but a bit too wide for us) + thai support -->
...@@ -155,7 +156,13 @@ ...@@ -155,7 +156,13 @@
</a> </a>
</li> </li>
<li><a> <!-- <li>
<a>
<button type="button" id="doTest" class="btn btn-sm">Run Test</button>
</a>
</li> -->
<li id="areacircle-size"><a>
Selector size<br> Selector size<br>
<div id="unranged-value" class="settingslider"></div> <div id="unranged-value" class="settingslider"></div>
</a></li> </a></li>
......
...@@ -8,6 +8,7 @@ function newPopup(url) { ...@@ -8,6 +8,7 @@ function newPopup(url) {
} }
// = = = = = = = = = = = [ Clusters Plugin ] = = = = = = = = = = = //
// Execution: ChangeGraphAppearanceByAtt( true ) // Execution: ChangeGraphAppearanceByAtt( true )
// It scans the existing node-attributes and t keeps only those which are Numeric. // It scans the existing node-attributes and t keeps only those which are Numeric.
// then, add the button in the html with the sigmaUtils.clustersBy(x) listener. // then, add the button in the html with the sigmaUtils.clustersBy(x) listener.
...@@ -250,6 +251,7 @@ function set_ClustersLegend ( daclass ) { ...@@ -250,6 +251,7 @@ function set_ClustersLegend ( daclass ) {
$("#legend_for_clusters").html( LegendDiv ) $("#legend_for_clusters").html( LegendDiv )
} }
// = = = = = = = = = = = [ / Clusters Plugin ] = = = = = = = = = = = //
//For CNRS //For CNRS
function getTopPapers(type){ function getTopPapers(type){
...@@ -414,70 +416,65 @@ function draw1Circle(ctx , x , y , color) { ...@@ -414,70 +416,65 @@ function draw1Circle(ctx , x , y , color) {
// new sigma.js: could be replaced by default _moveHandler with bindings ? // new sigma.js: could be replaced by default _moveHandler with bindings ?
// => atm rewrote entire function with new values // => atm rewrote entire function with new values
function circleTrackMouse(e) { function circleTrackMouse(e) {
if(!shift_key) { // new sigma.js 2D mouse context
// $.doTimeout(300,function (){ var ctx = TW.partialGraph.renderers[0].contexts.mouse;
// new sigma.js 2D mouse context ctx.globalCompositeOperation = "source-over";
var ctx = TW.partialGraph.renderers[0].contexts.mouse;
ctx.globalCompositeOperation = "source-over"; // clear zone each time to prevent repeated frame artifacts
ctx.clearRect(0, 0,
// clear zone each time to prevent repeated frame artifacts TW.partialGraph.renderers[0].container.offsetWidth,
ctx.clearRect(0, 0, TW.partialGraph.renderers[0].container.offsetHeight);
TW.partialGraph.renderers[0].container.offsetWidth,
TW.partialGraph.renderers[0].container.offsetHeight); // classic mousemove event or other similar non-sigma events
x = sigma.utils.getX(e);
// classic mousemove event or other similar non-sigma events y = sigma.utils.getY(e);
x = sigma.utils.getX(e);
y = sigma.utils.getY(e); // console.log("trackMouse mod: x", x, "y", y)
// console.log("trackMouse mod: x", x, "y", y) ctx.strokeStyle = '#000';
ctx.lineWidth = 1;
ctx.strokeStyle = '#000'; ctx.fillStyle = "#71C3FF";
ctx.lineWidth = 1; ctx.globalAlpha = 0.5;
ctx.fillStyle = "#71C3FF"; ctx.beginPath();
ctx.globalAlpha = 0.5;
ctx.beginPath(); // // labels appear on circle hover : OFF
// // labels appear on circle hover : OFF // convert (TODO CHECK IN THIS CONTEXT)
// var camCoords = TW.cam.cameraPosition(x,y)
// convert (TODO CHECK IN THIS CONTEXT) //
// var camCoords = TW.cam.cameraPosition(x,y) // var exactNodeset = circleGetAreaNodes(
// // camCoords.x,
// var exactNodeset = circleGetAreaNodes( // camCoords.y
// camCoords.x, // )
// camCoords.y // // using settings_explorerjs.showLabelsIfZoom as cam.ratio threshold
// ) // if(TW.partialGraph.camera.ratio < showLabelsIfZoom){
// // using settings_explorerjs.showLabelsIfZoom as cam.ratio threshold // for (var k of exactNodeset) {
// if(TW.partialGraph.camera.ratio < showLabelsIfZoom){ // // if (! exactNodeset[k].hidden) {
// for (var k of exactNodeset) { // exactNodeset[k].forceLabel=true;
// // if (! exactNodeset[k].hidden) { // // }
// exactNodeset[k].forceLabel=true; // }
// // } // }
// } // else {
// } // for(var k in exactNodeset){
// else { // n = exactNodeset[k]
// for(var k in exactNodeset){ // n.forceLabel=false;
// n = exactNodeset[k] //
// n.forceLabel=false; // // ?deprecated?
// // if(typeof(n.neighbour)!=="undefined") {
// // ?deprecated? // if(!n.neighbour) n.forceLabel=false;
// if(typeof(n.neighbour)!=="undefined") { // else n.forceLabel=true;
// if(!n.neighbour) n.forceLabel=false; // } else n.forceLabel=false;
// else n.forceLabel=true; // }
// } else n.forceLabel=false; // if(TW.partialGraph.forceatlas2 && TW.partialGraph.forceatlas2.count<=1) {
// } // TW.partialGraph.render()
// if(TW.partialGraph.forceatlas2 && TW.partialGraph.forceatlas2.count<=1) { // }
// TW.partialGraph.render() // }
// }
// } ctx.arc(x, y, cursor_size, 0, Math.PI * 2, true);
ctx.closePath();
ctx.arc(x, y, cursor_size, 0, Math.PI * 2, true); ctx.fill();
//ctx.arc(TW.partialGraph._core.width/2, TW.partialGraph._core.height/2, 4, 0, 2 * Math.PI, true);/*todel*/ ctx.stroke();
ctx.closePath(); ctx.globalAlpha = 1
ctx.fill();
ctx.stroke();
ctx.globalAlpha = 1
// });
}
} }
......
...@@ -92,7 +92,7 @@ var desirableScholarSize=6; //Remember that all scholars have the same size! ...@@ -92,7 +92,7 @@ var desirableScholarSize=6; //Remember that all scholars have the same size!
* - "off": button doesn't exist, fa2 stopped forever * - "off": button doesn't exist, fa2 stopped forever
**/ var fa2enabled=false;//"off"; **/ var fa2enabled=false;//"off";
var stopcriteria = false; var stopcriteria = false;
var fa2milliseconds=5000; // for initial auto-run if fa2enabled and any var fa2milliseconds=7000; // for initial auto-run if fa2enabled and any
// subsequent auto-runs if graph modified // subsequent auto-runs if graph modified
// deprecated ? // deprecated ?
...@@ -108,7 +108,7 @@ TW.nodesGreyBorderColor = "rgba(100, 100, 100, 0.5)"; ...@@ -108,7 +108,7 @@ TW.nodesGreyBorderColor = "rgba(100, 100, 100, 0.5)";
TW.selectedColor = "node" // "node" for a background like the node's color, TW.selectedColor = "node" // "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 = false // costly hi-def rendering (true => pixelRatio x 2)
// ============ < / DEVELOPER OPTIONS > ============ // ============ < / DEVELOPER OPTIONS > ============
...@@ -118,7 +118,7 @@ TW.overSampling = true // costly hi-def rendering (true => pixelRatio x 2) ...@@ -118,7 +118,7 @@ TW.overSampling = true // costly hi-def rendering (true => pixelRatio x 2)
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: 2, // ...but this ratio allows truly adjusting the sizes labelSizeRatio: 1.5, // ...but this ratio allows truly adjusting the sizes
labelThreshold: 5, labelThreshold: 5,
defaultEdgeType: 'curve', // 'curve' or 'line' defaultEdgeType: 'curve', // 'curve' or 'line'
...@@ -140,8 +140,8 @@ var sigmaJsDrawingProperties = { ...@@ -140,8 +140,8 @@ var sigmaJsDrawingProperties = {
// twNodeRendBorderColor: "#eee", // twNodeRendBorderColor: "#eee",
// font: "Crete Round", // font: "Crete Round",
// font: "Sahitya", font: "Ubuntu Condensed",
// fontStyle: "bold", fontStyle: "bold",
}; };
var sigmaJsGraphProperties = { var sigmaJsGraphProperties = {
minEdgeSize: 2, minEdgeSize: 2,
......
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