function getCoordinates(event) {
    var touches = event.touches && event.touches.length ? event.touches : [event];
    var e = (event.changedTouches && event.changedTouches[0]) ||
        (event.originalEvent && event.originalEvent.changedTouches &&
            event.originalEvent.changedTouches[0]) ||
        touches[0].originalEvent || touches[0];

    return {
      x: e.clientX,
      y: e.clientY
    };
  }
@ngdoc service
@name $swipe

@description
The `$swipe` service is a service that abstracts the messier details of hold-and-drag swipe
behavior, to make implementing swipe-related directives more convenient.

Requires the {@link ngTouch `ngTouch`} module to be installed.

`$swipe` is used by the `ngSwipeLeft` and `ngSwipeRight` directives in `ngTouch`, and by
`ngCarousel` in a separate component.

# Usage
The `$swipe` service is an object with a single method: `bind`. `bind` takes an element
which is to be watched for swipes, and an object with four handler functions. See the
documentation for `bind` below.