docs(ngClick): improve style

This commit is contained in:
Carlo s A. Guillen
2014-05-28 17:54:21 -07:00
committed by Brian Ford
parent 7a9d24551f
commit 84218af475

View File

@@ -94,9 +94,9 @@ ngTouch.directive('ngClick', ['$parse', '$timeout', '$rootElement',
// encapsulates this ugly logic away from the user.
//
// Why not just put click handlers on the element?
// We do that too, just to be sure. The problem is that the tap event might have caused the DOM
// to change, so that the click fires in the same position but something else is there now. So
// the handlers are global and care only about coordinates and not elements.
// We do that too, just to be sure. If the tap event caused the DOM to change,
// it is possible another element is now in that position. To take account for these possibly distinct elements,
// the handlers are global and care only about coordinates.
// Checks if the coordinates are close enough to be within the region.
function hit(x1, y1, x2, y2) {