viewporter: fixed tests

This commit is contained in:
Igor Oleinikov 2013-12-20 14:17:53 +04:00
parent 5d8961d175
commit c36a44bfb5

View File

@ -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';