Commit dc0b3250 authored by Romain Loth's avatar Romain Loth

allow oversampling x 2 if needed

parent 41135c18
......@@ -100,6 +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)
// ============ < / DEVELOPER OPTIONS > ============
......
......@@ -195,6 +195,15 @@ if(RES["OK"]) {
// [ Initiating Sigma-Canvas ]
var twjs_ = new TinaWebJS('#sigma-contnr');
// overriding pixelRatio is possible if we need very high definition
if (TW.overSampling) {
var realRatio = sigma.utils.getPixelRatio
sigma.utils.getPixelRatio = function() {
return 2 * realRatio()
}
}
// NB new sigma.js: autoResize (no need for AdjustSigmaCanvas + sigmaLimits)
console.log("categories: "+categories)
......@@ -232,7 +241,6 @@ if(RES["OK"]) {
console.log("customSettings", customSettings)
// custom nodes rendering
if (customSettings['twNodeRendBorder']) {
// overriding the def is simplest
......
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