MCPcopy Index your code
hub / github.com/Famous/famous-angular / checkAllowableRegions

Function checkAllowableRegions

src/scripts/directives/fa-input.js:87–95  ·  view source on GitHub ↗
(touchCoordinates, x, y)

Source from the content-addressed store, hash-verified

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.

Callers 2

onClickFunction · 0.85
preventGhostClickFunction · 0.85

Calls 1

hitFunction · 0.85

Tested by

no test coverage detected