function TapInput(element, tapRegions) {
    this.element = typeof element !== 'undefined' ? element : document;
    this.tapRegions = Array.isArray(tapRegions) ? tapRegions : [];
    this.upCount = 0;
    this.listeners = {
        touchStart: this.tap.bind(this)
    };
}

TapInput.prototype.add = function(tapRegion) {
    this.tapRegions.push(tapRegion);
};

TapInput.prototype.listen = function() {
    this.element.addEventListener('touchstart', this.listeners.touchStart);
};

TapInput.prototype.tap = function(event) {
    event.preventDefault();
    var x = event.touches[0].clientX;
    var y = event.touches[0].clientY;
    for(var i = 0; i < this.tapRegions.length; i += 1) {
        var tapRegion = this.tapRegions[i];
        if(tapRegion.boundingBox.isPointWithin(x, y) && typeof tapRegion.onTap === 'function') {
            tapRegion.onTap(x, y);
        }
    }
};

TapInput.prototype.detach = function() {
    this.element.removeEventListener('touchstart', this.listeners.touchStart);
};

@@ -237,16 +237,56 @@
 chStart:
+ this.tap.bind(this),%0A        mouseDown:
  this.ta
@@ -298,16 +298,16 @@
 d(this)%0A
-
     %7D;%0A%7D
@@ -513,16 +513,90 @@
 Start);%0A
+    this.element.addEventListener('mousedown', this.listeners.mouseDown);%0A
 %7D;%0A%0ATapI
@@ -674,66 +674,180 @@
 var 
-x = event.touches%5B0%5D.clientX;%0A    var y = event.touches%5B0%5D
+isTouchEvent = event.type === 'touchstart';%0A    var x = isTouchEvent ? event.touches%5B0%5D.clientX : event.clientX;%0A    var y = isTouchEvent ? event.touches%5B0%5D.clientY : event
 .cli
@@ -1138,32 +1138,32 @@
  = function() %7B%0A
-
     this.element
@@ -1225,11 +1225,88 @@
 Start);%0A
+    this.element.removeEventListener('mousedown', this.listeners.mouseDown);%0A
 %7D;%0A

Add mouse input to tap input