Commit 9bf87773 authored by Romain Loth's avatar Romain Loth

allow *not* rendering in cancelSelection

parent 0a553c8d
......@@ -71,7 +71,7 @@ function SelectionEngine() {
this.search_n_select = function(string) {
// alert("search is happening !")
cancelSelection(false);
cancelSelection(false, {norender:true});
if (typeof string != "string") {
return -1 ;
......@@ -150,7 +150,8 @@ function SelectionEngine() {
*/
// ====================
this.MultipleSelection2 = (function(nodes,nodesDict,edgesDict) {
// =====
var tMS2_deb = performance.now()
console.log("IN SelectionEngine.MultipleSelection2:")
console.log("nodes", nodes)
......@@ -315,6 +316,9 @@ function SelectionEngine() {
updateRelatedNodesPanel( selections , same, oppos );
var tMS2_fin = performance.now()
console.log("end MultipleSelection2, own time:", tMS2_fin-tMS2_deb)
}).index()
};
......@@ -681,7 +685,7 @@ TinaWebJS = function ( sigmacanvas ) {
// we keep the global selections and then clear it and all its effects
var previousSelection = selections
cancelSelection(false);
cancelSelection(false, {norender:true}); // no need to render before MS2
if (cursor_size == 0) {
var targeted = SelInst.SelectorEngine( {
......
'use strict';
function cancelSelection (fromTagCloud) {
// settings: {norender: Bool}
function cancelSelection (fromTagCloud, settings) {
console.log("\t***in cancelSelection");
if (!settings) settings = {}
highlightSelectedNodes(false); //Unselect the selected ones :D
opossites = [];
selections = [];
......@@ -72,8 +76,10 @@ function cancelSelection (fromTagCloud) {
// global flag
TW.selectionActive = false
// finally redraw
TW.partialGraph.render();
if (!settings.norender) {
// finally redraw
TW.partialGraph.render();
}
}
function highlightSelectedNodes(flag){
......
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