panel: expose useful event.firstTarget
This commit is contained in:
parent
bdf3ad1958
commit
6fa3f9862e
2 changed files with 10 additions and 3 deletions
|
|
@ -82,8 +82,11 @@ This script has access to the same variables and functions as the `script` prope
|
|||
|
||||
??? infos "Containers onTouch"
|
||||
|
||||
*Currently only available in v1.29.0-beta*
|
||||
|
||||
Containers (root, panel, etc) can monitor touch events happening inside them, it works like with [Canvas](../canvas/#ontouch), with a few differences:
|
||||
|
||||
- `event.firstTarget` will return the id of the first touched widget
|
||||
- setting `event.preventDefault` to `true` will prevent the event from reaching widgets in the container ('start' and 'move' events only)
|
||||
- setting `event.allowScroll` to `true` will allow touch scrolling where it would normally be prevented ('start' event only)
|
||||
- setting `event.inertia` will affect 'move' events (works like widget `sensitivity` in reverse (1 = normal, 10 = slow move))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue