a million fixes
This commit is contained in:
parent
b1696499e5
commit
c294d7fd6a
12 changed files with 140 additions and 168 deletions
|
|
@ -213,7 +213,9 @@ export function measure(ui: UIValue): { width: number, height: number } {
|
|||
}
|
||||
|
||||
export function hitTest(x: number, y: number): { event: any, relativeX: number, relativeY: number } | null {
|
||||
for (const region of clickRegions) {
|
||||
for (let i = clickRegions.length - 1; i >= 0; i--) {
|
||||
const region = clickRegions[i];
|
||||
|
||||
if (x >= region.x && x < region.x + region.width &&
|
||||
y >= region.y && y < region.y + region.height) {
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue