mirror of https://github.com/luileito/jsketch.git
Include event type
This commit is contained in:
parent
5fab1d0cf7
commit
f182258713
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -665,15 +665,25 @@
|
|||
var touches = e.originalEvent.changedTouches;
|
||||
for (var i = 0; i < touches.length; i++) {
|
||||
var touch = touches[i];
|
||||
evtProps(touch, e.originalEvent);
|
||||
callback(touch);
|
||||
}
|
||||
} else {
|
||||
// Track only the current finger.
|
||||
var touch = e.originalEvent.touches[0];
|
||||
evtProps(touch, e.originalEvent);
|
||||
callback(touch);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
function evtProps(targetEvent, sourceEvent) {
|
||||
// TODO: Ensure all desired properties are included in the target event.
|
||||
if (!targetEvent.type) targetEvent.type = sourceEvent.type;
|
||||
};
|
||||
|
||||
/**
|
||||
* Redraw canvas according to stored strokes data.
|
||||
* @return {object} jQuery
|
||||
|
|
|
|||
|
|
@ -661,16 +661,26 @@
|
|||
var touches = e.changedTouches;
|
||||
for (var i = 0; i < touches.length; i++) {
|
||||
var touch = touches[i];
|
||||
evtProps(touch, e);
|
||||
callback(touch);
|
||||
}
|
||||
} else {
|
||||
// Track only the current finger.
|
||||
var touch = e.touches[0];
|
||||
evtProps(touch, e);
|
||||
callback(touch);
|
||||
}
|
||||
e.preventDefault();
|
||||
};
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
function evtProps(targetEvent, sourceEvent) {
|
||||
// TODO: Ensure all desired properties are included in the target event.
|
||||
if (!targetEvent.type) targetEvent.type = sourceEvent.type;
|
||||
};
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue