Skip to content

Commit 629083b

Browse files
Selecting children in tabular view now also selects the node itself
1 parent 7562b29 commit 629083b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "iknow-entity-browser",
3-
"version": "0.9.3",
3+
"version": "0.9.4",
44
"description": "Visualizer for iKnow entities",
55
"main": "gulpfile.babel.js",
66
"scripts": {

src/static/js/tabular/index.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,14 @@ function switchSelected () {
3333
/**
3434
* this: node
3535
*/
36-
function toggleChildrenSelected (e) {
36+
function toggleChildrenSelected (e, nodeItself = true) {
3737
let sel = false,
3838
el = e.target || e.srcElement;
3939
for (let o of this.children) { if (o.selected) { sel = true; break; } }
4040
if (sel)
41-
deselectAll(this, false);
41+
deselectAll(this, nodeItself);
4242
else
43-
selectAll(this, false);
43+
selectAll(this, nodeItself);
4444
el.className = `icon-${ !sel ? "filled" : "outline" }`;
4545
this.element.classList.remove("highlighted");
4646
updateSelection();
@@ -84,7 +84,7 @@ function insertRows (data, table, selected) {
8484
}
8585
}
8686
ei.className = `icon-${ sel ? "filled" : "outline" }`;
87-
ei.setAttribute("title", `${ sel ? "Deselect" : "Select" } children`);
87+
ei.setAttribute("title", `${ sel ? "Deselect" : "Select" } node and children`);
8888
ei.addEventListener("click", toggleChildrenSelected.bind(node));
8989
ee.className = `icon-${ selected ? "close" : "add" }`;
9090
ee.setAttribute("title", `${ selected ? "Remove from" : "Add to" } selection`);

0 commit comments

Comments
 (0)