mirror of
https://github.com/stan-smith/FossFLOW.git
synced 2025-12-24 06:58:48 -05:00
fix: sets node focus correctly
This commit is contained in:
@@ -58,6 +58,8 @@ export class Node {
|
||||
}
|
||||
|
||||
setFocus(state: boolean) {
|
||||
this.isFocussed = state;
|
||||
|
||||
if (!state && this.isSelected) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user