Past nodes fixed, codestyle

This commit is contained in:
barsdeveloper
2021-11-07 21:41:40 +01:00
parent afa27bf42c
commit ad8c34cdab
20 changed files with 283 additions and 192 deletions

View File

@@ -8,16 +8,21 @@ export default class Context {
this.options = options
if (options?.wantsFocusCallback ?? false) {
let self = this
this.blueprint.addEventListener("blueprintfocus", _ => self.blueprintFocused())
this.blueprint.addEventListener("blueprintunfocus", _ => self.blueprintUnfocused())
this.blueprintfocusHandler = _ => self.blueprintFocused()
this.blueprintunfocusHandler = _ => self.blueprintUnfocused()
this.blueprint.addEventListener("blueprintfocus", this.blueprintfocusHandler)
this.blueprint.addEventListener("blueprintunfocus", this.blueprintunfocusHandler)
}
}
unlistenDOMElement() {
this.blueprint.removeEventListener("blueprintfocus", this.blueprintfocusHandler)
this.blueprint.removeEventListener("blueprintunfocus", this.blueprintunfocusHandler)
}
blueprintFocused() {
console.log("focused")
}
blueprintUnfocused() {
}
}