JSLint
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2644 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user