|
|
@@ -815,6 +815,7 @@ they make. That function will add the correct id and send it to the worker.</p>
|
|
|
'pointerType',
|
|
|
'clientX',
|
|
|
'clientY',
|
|
|
+ 'pointerId',
|
|
|
'pageX',
|
|
|
'pageY',
|
|
|
]);
|
|
|
@@ -853,6 +854,10 @@ function makeSendPropertiesHandler(properties) {
|
|
|
}
|
|
|
|
|
|
function touchEventHandler(event, sendFn) {
|
|
|
+ // preventDefault() fixes mousemove, mouseup and mousedown
|
|
|
+ // firing when doing a simple touchup touchdown
|
|
|
+ // Happens only at offscreen canvas
|
|
|
+ event.preventDefault();
|
|
|
const touches = [];
|
|
|
const data = {type: event.type, touches};
|
|
|
for (let i = 0; i < event.touches.length; ++i) {
|
|
|
@@ -860,6 +865,8 @@ function touchEventHandler(event, sendFn) {
|
|
|
touches.push({
|
|
|
pageX: touch.pageX,
|
|
|
pageY: touch.pageY,
|
|
|
+ clientX: touch.clientX,
|
|
|
+ clientY: touch.clientY,
|
|
|
});
|
|
|
}
|
|
|
sendFn(data);
|