Include event type

This commit is contained in:
Luis Leiva 2021-06-18 17:57:10 +02:00
parent 5fab1d0cf7
commit f182258713
4 changed files with 22 additions and 2 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

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

View File

@ -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
*/