editor: some variables not appearing as defined in onKeyboard

This commit is contained in:
bordun 2022-04-09 17:16:05 +02:00
parent 8faaf997a1
commit 8c7df3744a
2 changed files with 3 additions and 6 deletions

View file

@ -166,12 +166,8 @@ class CodeEditor {
if (this.language === 'javascript') {
let globals = {}
if (this.name === 'onEvent') {
if (this.widget.getProp('event') === 'value') {
globals = {id: true, value: true, touch: true}
} else if (this.widget.getProp('event') === 'keyboard') {
globals = {type: true, key: true, code: true, ctrl: true, shift: true, alt: true, meta: true}
}
if (this.name === 'onKeyboard') {
globals = {type: true, key: true, code: true, ctrl: true, shift: true, alt: true, meta: true}
} else if (this.name === 'onValue') {
globals = {id: true, value: true, touch: true}
} else if (this.name === 'onDraw') {