actionsheet unit test

This commit is contained in:
cookfront
2017-04-12 12:01:44 +08:00
parent b207efe729
commit 7c75f48eaa
12 changed files with 130 additions and 36 deletions
+2 -3
View File
@@ -24,7 +24,6 @@ Input.prototype = Object.create(new EventEmitter());
extend(Input.prototype, {
bind: function(host) {
bindEvents(host, 'touchstart mousedown', this.onTouchStart);
if (this.options.listenMoving) {
bindEvents(window, 'touchmove mousemove', this.onTouchMove);
@@ -74,11 +73,11 @@ extend(Input.prototype, {
this.orgDirection = Math.abs(distX) > Math.abs(distY);
}
this.emit('move', {x: distX, y: distY}, isEnd, e, {orgDirection: this.orgDirection});
this.emit('move', { x: distX, y: distY }, isEnd, e, { orgDirection: this.orgDirection });
},
pointerEventToXY: function(e) {
var out = {x: 0, y: 0};
var out = { x: 0, y: 0 };
var type = e.type;
if (e.originalEvent) {
e = e.originalEvent;