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