Home Reference Source Test


 * @file ZingTouch.js
 * Main object containing API methods and Gesture constructors

import Region from './core/classes/Region.js';
import Gesture from './gestures/Gesture.js';
import Expand from './gestures/Expand.js';
import Pan from './gestures/Pan.js';
import Pinch from './gestures/Pinch.js';
import Rotate from './gestures/Rotate.js';
import Swipe from './gestures/Swipe.js';
import Tap from './gestures/Tap.js';

 * The global API interface for ZingTouch. Contains a constructor for the Region Object,
 * and constructors for each predefined Gesture.
 * @type {Object}
 * @namespace ZingTouch
var ZingTouch = {
  _regions: [],

  Gesture: Gesture,
  Expand: Expand,
  Pan: Pan,
  Pinch: Pinch,
  Rotate: Rotate,
  Swipe: Swipe,
  Tap: Tap,
  Region: function (element, capture, preventDefault) {
    var id = ZingTouch._regions.length;
    var region = new Region(element, capture, preventDefault, id);
    return region;

export default ZingTouch;