Commit 99093f69 authored by Romain Loth's avatar Romain Loth

generalize selection action as select/deselect when add

(used to be for meso view only
parent 44e4736d
......@@ -22,20 +22,12 @@ function SelectionEngine() {
// currsels = bunch of nodes from a click in the map
if(args.addvalue) {
// FOR SIMPLE UNIQUE UNION
if ( TW.SystemState().level) {
targeted = args.currsels.concat(args.prevsels.filter(function (item) {
return args.currsels.indexOf(item) < 0;
}));
}
// meso view: complementary select if disjoint, deselect if overlap
else {
targeted = args.currsels.filter(function (item) {
return args.prevsels.indexOf(item) < 0;
}).concat(args.prevsels.filter(function (item) {
return args.currsels.indexOf(item) < 0;
}));;
}
// complementary select if disjoint, deselect if overlap
targeted = args.currsels.filter(function (item) {
return args.prevsels.indexOf(item) < 0;
}).concat(args.prevsels.filter(function (item) {
return args.currsels.indexOf(item) < 0;
}));;
}
else {
targeted = args.currsels;
......
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