mirror of https://github.com/espruino/BangleApps
allow non-button elements of Layout to be tapped
parent
83a849a9d1
commit
af0dfed2c3
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue