allow non-button elements of Layout to be tapped

pull/1411/head
Gordon Williams 2022-02-08 10:42:14 +00:00
parent 83a849a9d1
commit af0dfed2c3
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ function Layout(layout, options) {
// Handler for touch events
function touchHandler(l,e) {
if (l.type=="btn" && l.cb && e.x>=l.x && e.y>=l.y && e.x<=l.x+l.w && e.y<=l.y+l.h) {
if (l.cb && e.x>=l.x && e.y>=l.y && e.x<=l.x+l.w && e.y<=l.y+l.h) {
if (e.type==2 && l.cbl) l.cbl(e); else if (l.cb) l.cb(e);
}
if (l.c) l.c.forEach(n => touchHandler(n,e));