Commit 435ca68c authored by Romain Loth's avatar Romain Loth

remove some re-rendering directives (prevent double work in cases when it's...

remove some re-rendering directives (prevent double work in cases when it's going to be done in the next function calls)
parent dc0b3250
......@@ -289,7 +289,6 @@ function selectionUni(currentNode){
highlightSelectedNodes(false);
opossites = [];
selections = [];
TW.partialGraph.render();
}
if((typeof selections[currentNode.id])=="undefined"){
......
......@@ -185,6 +185,7 @@ SelectionEngine = function() {
// got results
// -----------
this.MultipleSelection2({nodes:targeted});
}
else {
// no results
......@@ -204,7 +205,6 @@ SelectionEngine = function() {
TW.lastQuery = string ;
$("input#searchinput").val("");
$("input#searchinput").autocomplete( "close" );
TW.partialGraph.render();
return targeted.length
}
......@@ -509,7 +509,6 @@ TinaWebJS = function ( sigmacanvas ) {
SelInst.MultipleSelection2({nodes:targeted});
cursor_size = prev_cursor_size;
}
TW.partialGraph.render();
$("input#searchinput").val("");
$("input#searchinput").autocomplete( "close" );
......@@ -551,7 +550,6 @@ TinaWebJS = function ( sigmacanvas ) {
cancelSelection(false);
SelInst.MultipleSelection2({nodes:targeted});
}
TW.partialGraph.render();
$("input#searchinput").val("");
$("input#searchinput").autocomplete( "close" );
......@@ -634,10 +632,6 @@ TinaWebJS = function ( sigmacanvas ) {
$('#sigma-contnr').animate({
"width": fullwidth-sidebar.width()+"px"
}, { duration: 400, queue: false });
setTimeout(function() {
partialGraph.resize();
partialGraph.render();
}, 400);
}
else {
//HIDE rightcolumn
......@@ -654,10 +648,6 @@ TinaWebJS = function ( sigmacanvas ) {
$('#sigma-contnr').animate({
"width": fullwidth+"px"
},{ duration: 400, queue: false });
setTimeout(function() {
partialGraph.resize();
partialGraph.render();
}, 400);
}
});
......@@ -931,7 +921,6 @@ TinaWebJS = function ( sigmacanvas ) {
onchange:function(value){
// console.log("en cursorsize: "+value);
cursor_size=value;
if(cursor_size==0) partialGraph.render();
// have reindex ready to go for when user stops moving slider
// if (reindexTimeout) {
......@@ -940,8 +929,7 @@ TinaWebJS = function ( sigmacanvas ) {
// reindexTimeout = null
// }
// reindexTimeout = setTimeout(function() {
// TW.partialGraph.render()
// // =====
// TW.partialGraph.refresh()
// console.log("graph quadtree reindexed for cursor")
// }, 500)
}
......
......@@ -38,10 +38,6 @@ function cancelSelection (fromTagCloud) {
}
//Nodes colors go back to normal
// new sigma.js redraw
TW.partialGraph.render();
if(fromTagCloud==false){
$("#names").html("");
$("#topPapers").html(""); $("#topPapers").hide();
......@@ -67,7 +63,7 @@ function cancelSelection (fromTagCloud) {
if(TW.partialGraph.states.slice(-1)[0].level)
LevelButtonDisable(true);
// new sigma.js redraw
// finally redraw
TW.partialGraph.render();
}
......@@ -212,7 +208,10 @@ function htmlfied_alternodes(elems) {
function manualForceLabel(nodeid,active) {
// console.log("manual|"+nodeid+"|"+active)
TW.partialGraph.graph.nodes(nodeid).active=active;
TW.partialGraph.render();
// full redraw
// TODO try single node redraw
TW.partialGraph.render();
}
function htmlfied_samenodes(elems) {
......@@ -283,6 +282,7 @@ function manualSelectNode ( nodeid ) {
cancelSelection(false);
var SelInst = new SelectionEngine();
SelInst.MultipleSelection2({nodes:[nodeid]});
// (MultipleSelection2 will do the re-rendering)
}
function htmlfied_tagcloud(elems , limit) {
......
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