diff options
Diffstat (limited to 'ui/Root.js')
-rw-r--r-- | ui/Root.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/Root.js b/ui/Root.js index 22c2c97..d306a41 100644 --- a/ui/Root.js +++ b/ui/Root.js @@ -90,4 +90,11 @@ module.exports = class Root extends DisplayElement { this.cursorMoved() } + + isChildOrSelfSelected(el) { + if (!this.selected) return false + if (this.selected === el) return true + if (this.selected.directAncestors.includes(el)) return true + return false + } } |