scrpting: restore legacy touch state feature, deprecate it and replace with a more generic onTouch handler

This commit is contained in:
jean-emmanuel 2022-01-12 14:42:39 +01:00
parent d478de49f6
commit 24db0ed984
11 changed files with 147 additions and 65 deletions

View file

@ -224,7 +224,9 @@ class UiInspectorField extends UiWidget {
} else if (this.name === 'onDraw') {
globals = {value: true, height: true, width: true, ctx: true, cssVars: true}
} else if (this.name === 'onTouch') {
globals = {value: true, height: true, width: true, event: true}
globals = this.widget.getProp('type') === 'canvas' ?
{value: true, height: true, width: true, event: true} :
{value: true, event: true, handle: true}
}
globals.locals = true
globals.console = true