Commit 2e4037c4 authored by Romain Loth's avatar Romain Loth

[FIX] graphExplorer: checkBox (BUG-8)

parent cb3e51d9
......@@ -89,10 +89,10 @@ function CRUD( list_id , ngram_ids , http_method , callback) {
// general listener: shift key in the window <=> add to selection
$(document).on('keyup keydown', function(e){
// changes the global boolean ("add node to selection" status) if keydown and SHIFT
checkBox = e.shiftKey
checkBox = manuallyChecked || e.shiftKey
// show it in the real checkbox too
$('#checkboxdiv').prop("checked", e.shiftKey)
$('#checkboxdiv').prop("checked", manuallyChecked || e.shiftKey)
} );
// = = = = = = = = = = = [ Clusters Plugin ] = = = = = = = = = = = //
......
......@@ -169,6 +169,7 @@ var gexf;
//var zoom=0;
var checkBox=false;
var manuallyChecked = false;
var overNodes=false;
var shift_key=false;
......
......@@ -79,7 +79,13 @@ function highlightSelectedNodes(flag){
function alertCheckBox(eventCheck){
// console.log('FUN t.methods:alertCheckBox')
if(!isUndef(eventCheck.checked)) checkBox=eventCheck.checked;
// NB: we use 2 booleans to adapt to SHIFT checking
// - var checkBox ---------> has the real box state
// - var manuallyChecked --> remembers if it was changed here
if(!isUndef(eventCheck.checked)) {
checkBox=eventCheck.checked;
manuallyChecked = eventCheck.checked
}
}
// States:
......
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