Commit 24baa5d2 authored by Romain Loth's avatar Romain Loth

minor update remarks for future changes

parent ded01480
......@@ -299,7 +299,7 @@ TW.conf = (function(TW){
logParsers: false, // ...about parsing said data
logFacets: false, // ...about parsing node attribute:value facets
logSettings: false, // ...about settings at Tina and Sigma init time
logStates: true, // ...about TW.states array
logStates: false, // ...about TW.states array
logSelections: false
}
......
......@@ -161,7 +161,7 @@ function SelectionEngine() {
var tMS2_deb = performance.now()
console.log("IN SelectionEngine.MultipleSelection2:")
console.log("args", args)
console.log("nodes", args.nodes)
}
greyEverything();
......@@ -325,6 +325,7 @@ function SelectionEngine() {
TW.partialGraph.render();
// TODO FIX
updateRelatedNodesPanel( theSelection , same, oppos )
if (TW.conf.debug.logSelections) {
......@@ -838,7 +839,7 @@ var TinaWebJS = function ( sigmacanvas ) {
// when one node and normal click
// ===============================
partialGraph.bind('clickNode', function(e) {
console.log("clickNode event e", e.data.node)
// console.log("clickNode event e", e.data.node)
// new sigma.js gives easy access to clicked node!
var theNodeId = e.data.node.id
......@@ -850,9 +851,12 @@ var TinaWebJS = function ( sigmacanvas ) {
currsels:[theNodeId],
prevsels: TW.SystemState().selectionNids
} )
// 2)
//
// not needed because selInst calls greyEverything
// cancelSelection(false, {norender:true}); // no need to render before MS2
// 3)
// 2)
if(targeted.length>0) {
selInst.MultipleSelection2( {nodes:targeted} )
}
......@@ -1032,7 +1036,7 @@ var TinaWebJS = function ( sigmacanvas ) {
TW.partialGraph.graph.clear()
TW.partialGraph.refresh()
// ££TODO push state
TW.pushState({'sels':[]})
TW.SystemState().selectionNids = []
}
}
......
......@@ -32,7 +32,7 @@ TW.states = [TW.initialSystemState]
TW.SystemState = function() { return TW.states.slice(-1)[0] }
// -------------------------------8<--------------
// £TODO remove deprecated here and in parseCustom
// £TODO remove deprecated here and in parseCustom or change to an index by type
var nodes1 = {};
var nodes2 = {};
var bipartiteD2N = {};
......
......@@ -147,7 +147,7 @@ function cancelSelection (fromTagCloud, settings) {
}
//Nodes colors go back to previous
// £TODO partly duplicate effort with (de)highlightSelectedNodes
// £TODO partly duplicate effort with (de)highlightSelectedNodes and greyEverything
// => could be replaced by a (de)highlightSelectedAndNeighbors
// on smaller set (here entire nodeset!)
for(let j in TW.nodeIds){
......@@ -460,6 +460,9 @@ function LevelButtonDisable( TF ){
// edges greyish color for unselected, when we have a selection
// NB: we just change the flags, not the colors
// renderer will see the flags and handle the case accordingly
// £TODO rendering optimization: reduce effort by looping only on previously selected and neighbors
// and having (!active && !highlight) tested instead of then useless grey flag
function greyEverything(){
for(var nid in TW.Nodes){
......
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