mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
viewporter: fixed tests
This commit is contained in:
@@ -119,7 +119,7 @@ function test_swipey() {
|
||||
}).trigger(viewporter.ACTIVE ? 'viewportchange' : 'resize');
|
||||
$('canvas').bind(iOS ? 'touchstart' : 'mousedown', function (e) {
|
||||
e.preventDefault();
|
||||
var touches = iOS ? e.originalEvent.changedTouches : [e.originalEvent];
|
||||
var touches = iOS ? (<any>e.originalEvent).changedTouches : [e.originalEvent];
|
||||
var identifier;
|
||||
for (var i = 0; i < touches.length; i++) {
|
||||
identifier = touches[i].identifier || 'mouse';
|
||||
@@ -133,7 +133,7 @@ function test_swipey() {
|
||||
});
|
||||
|
||||
$('canvas').bind(iOS ? 'touchmove' : 'mousemove', function (e) {
|
||||
var touches = iOS ? e.originalEvent.changedTouches : [e.originalEvent];
|
||||
var touches = iOS ? (<any>e.originalEvent).changedTouches : [e.originalEvent];
|
||||
var identifier;
|
||||
for (var i = 0; i < touches.length; i++) {
|
||||
identifier = touches[i].identifier || 'mouse';
|
||||
@@ -144,7 +144,7 @@ function test_swipey() {
|
||||
});
|
||||
|
||||
$('canvas').bind(iOS ? 'touchend' : 'mouseup', function (e) {
|
||||
var touches = iOS ? e.originalEvent.changedTouches : [e.originalEvent];
|
||||
var touches = iOS ? (<any>e.originalEvent).changedTouches : [e.originalEvent];
|
||||
var identifier;
|
||||
for (var i = 0; i < touches.length; i++) {
|
||||
identifier = touches[i].identifier || 'mouse';
|
||||
|
||||
Reference in New Issue
Block a user