git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2644 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Brett Zamir
2014-01-31 02:13:37 +00:00
parent d12694f9fa
commit 75bd787023
11 changed files with 338 additions and 263 deletions

View File

@@ -1,7 +1,8 @@
// http://ross.posterous.com/2008/08/19/iphone-touch-events-in-javascript/
function touchHandler(event) {
function touchHandler(event) {'use strict';
var touches = event.changedTouches,
var simulatedEvent,
touches = event.changedTouches,
first = touches[0],
type = "";
switch (event.type) {
@@ -15,7 +16,7 @@ function touchHandler(event) {
// screenX, screenY, clientX, clientY, ctrlKey,
// altKey, shiftKey, metaKey, button, relatedTarget);
var simulatedEvent = document.createEvent("MouseEvent");
simulatedEvent = document.createEvent("MouseEvent");
simulatedEvent.initMouseEvent(type, true, true, window, 1,
first.screenX, first.screenY,
first.clientX, first.clientY, false,