mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-19 08:21:03 +08:00
docs(ngClick): improve style
This commit is contained in:
committed by
Brian Ford
parent
7a9d24551f
commit
84218af475
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user