(touchCoordinates, x, y)
| 85 | // Returns true if the click should be allowed. |
| 86 | // Splices out the allowable region from the list after it has been used. |
| 87 | function checkAllowableRegions(touchCoordinates, x, y) { |
| 88 | for (var i = 0; i < touchCoordinates.length; i += 2) { |
| 89 | if (hit(touchCoordinates[i], touchCoordinates[i+1], x, y)) { |
| 90 | touchCoordinates.splice(i, i + 2); |
| 91 | return true; // allowable region |
| 92 | } |
| 93 | } |
| 94 | return false; // No allowable region; bust it. |
| 95 | } |
| 96 | |
| 97 | // Global click handler that prevents the click if it's in a bustable zone and preventGhostClick |
| 98 | // was called recently. |
no test coverage detected