Commit d3fcaa96 authored by Romain Loth's avatar Romain Loth

Multiple nodes selection: hide unselect button when nothing selected

parent d1d9a400
......@@ -312,16 +312,16 @@
<!-- Sidebar right, old css -->
<div id="rightcolumn">
<button
style="color: #900;font-weight: bold;font-size: 70%;text-transform: uppercase;float:right;"
onClick='cancelSelection(false);'
>X</button>
<!-- TODO: put the video on cloud for better streaming & player -->
<video width="100%"
id="video_explanation"
src="video/AXA2015.mp4" controls="" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></video>
<button id="unselectbutton"
style="color: #900;font-weight: bold;font-size: 70%;text-transform: uppercase;float:right;"
onClick='cancelSelection(false);'
>X</button>
<div id="tips"></div>
<div id="names"></div>
......
......@@ -47,8 +47,9 @@ function sigmaLimits( sigmacanvas ) {
}
// will be instanciated as SelInst
SelectionEngine = function() {
// Selection Engine!! finally...
this.SelectorEngine_part01 = (function(cursorsize, area ) {
var clickedNodes = []
......@@ -61,6 +62,7 @@ SelectionEngine = function() {
return n.id;
});
}
return clickedNodes.map(Number);
}).index();
......@@ -261,14 +263,17 @@ SelectionEngine = function() {
});
return actualSel;
}
/**
* Main function for any selecting action
*/
// external usage : partialGraph , updateLeftPanel_fix();
this.MultipleSelection2 = (function(nodes,nodesDict,edgesDict) {
console.log("IN SelectionEngine.MultipleSelection2:")
console.log(nodes)
greyEverything();
greyEverything();
var typeNow = TW.partialGraph.states.slice(-1)[0].type.map(Number).join("|")
console.log ("console.loging the Type:")
......@@ -326,6 +331,8 @@ SelectionEngine = function() {
}
}
// show the button to remove selection
$("#unselectbutton").show() ;
var the_new_sels = Object.keys(selections).map(Number)
TW.partialGraph.states.slice(-1)[0].selections = the_new_sels;
......@@ -380,7 +387,7 @@ TinaWebJS = function ( sigmacanvas ) {
}
this.SearchListeners = function () {
var SelInst = new SelectionEngine();
//~ $.ui.autocomplete.prototype._renderItem = function(ul, item) {
......
......@@ -11,7 +11,6 @@ function cancelSelection (fromTagCloud) {
TW.partialGraph.states.slice(-1)[0].selections=[]
//Nodes colors go back to normal
overNodes=false;
e = TW.partialGraph._core.graph.edges;
......@@ -29,13 +28,14 @@ function cancelSelection (fromTagCloud) {
//Nodes colors go back to normal
if(fromTagCloud==false){
$("#names").html("");
$("#topPapers").html(""); $("#topPapers").hide();
$("#opossiteNodes").html(""); $("#tab-container").hide();
$("#information").html("");
$("#searchinput").val("");
$("#switchbutton").hide();
$("#unselectbutton").hide();
$("#tips").html(getTips());
}
for(var i in deselections){
......
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