fix: sets node focus correctly

This commit is contained in:
Mark Mankarious
2023-07-05 18:09:15 +01:00
parent 54dafa4741
commit af2d96d77b
2 changed files with 5 additions and 1 deletions

View File

@@ -58,6 +58,8 @@ export class Node {
}
setFocus(state: boolean) {
this.isFocussed = state;
if (!state && this.isSelected) {
return;
}

View File

@@ -87,7 +87,9 @@ export class Nodes {
}
unfocusAll() {
this.nodes.forEach((node) => node.setFocus(false));
this.nodes.forEach((node) => {
if (node.isFocussed) node.setFocus(false);
});
}
clear() {