Commit 5f574220 authored by Romain Loth's avatar Romain Loth

fix max zoom ratio

parent 8e293315
...@@ -152,7 +152,7 @@ var sigmaJsGraphProperties = { ...@@ -152,7 +152,7 @@ var sigmaJsGraphProperties = {
maxEdgeSize: 4 maxEdgeSize: 4
}; };
var sigmaJsMouseProperties = { var sigmaJsMouseProperties = {
minRatio: 0.1, minRatio: .03125, // 1/32 pour permettre zoom x32
maxRatio: 2 maxRatio: 2
}; };
// ============ < / SIGMA.JS PROPERTIES > ============ // ============ < / SIGMA.JS PROPERTIES > ============
...@@ -193,11 +193,11 @@ var lastFilter = [] ...@@ -193,11 +193,11 @@ var lastFilter = []
TW.Filters = {} TW.Filters = {}
//
var overviewWidth = 200; // var overviewWidth = 200;
var overviewHeight = 175; // var overviewHeight = 175;
var overviewScale = 0.25; // var overviewScale = 0.25;
var overviewHover=false; // var overviewHover=false;
var moveDelay = 80, zoomDelay = 2; var moveDelay = 80, zoomDelay = 2;
//var Vecindad; //var Vecindad;
TW.partialGraph; TW.partialGraph;
...@@ -210,9 +210,10 @@ var nodeslength=0; ...@@ -210,9 +210,10 @@ var nodeslength=0;
var labels = []; var labels = [];
var numberOfDocs=0; var numberOfDocs=0; // not used!
var numberOfNGrams=0; var numberOfNGrams=0; // not used, but cf TW.nNodes TW.nEdges
// FIXME should become TW.*
var selections = []; var selections = [];
var deselections={}; var deselections={};
var opossites = {}; var opossites = {};
......
...@@ -759,8 +759,8 @@ TinaWebJS = function ( sigmacanvas ) { ...@@ -759,8 +759,8 @@ TinaWebJS = function ( sigmacanvas ) {
// new sigma.js current zoom ratio // new sigma.js current zoom ratio
value: partialGraph.camera.ratio, value: partialGraph.camera.ratio,
min: 1 / sigmaJsMouseProperties.maxRatio, min: 1 / sigmaJsMouseProperties.maxRatio, // ex x.5
max: 1 / sigmaJsMouseProperties.minRatio, max: 1 / sigmaJsMouseProperties.minRatio, // ex x32
// range: true, // range: true,
step: .2, step: .2,
value: 1, value: 1,
......
...@@ -3,14 +3,6 @@ ...@@ -3,14 +3,6 @@
// always useful // always useful
var theHtml = document.getElementsByTagName('html')[0] var theHtml = document.getElementsByTagName('html')[0]
// overriding pixelRatio is possible if we need very high definition
// var realRatio = sigma.utils.getPixelRatio
// if (TW.overSampling) {
// sigma.utils.getPixelRatio = function() {
// return 2 * realRatio()
// }
// }
TW.anynodegoes = true TW.anynodegoes = true
// TW.anynodegoes = true // TW.anynodegoes = true
......
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