Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions jquery.ui.touch-punch.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,20 @@
var touch = event.originalEvent.changedTouches[0],
simulatedEvent = document.createEvent('MouseEvents');

var zoomRatio=b("body").css("zoom");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is b()? Maybe $()? You pasted changes from minified source with obfuscated names.

if(isNaN(zoomRatio))zoomRatio=1;

// Initialize the simulated mouse event using the touch event's coordinates
simulatedEvent.initMouseEvent(
simulatedType, // type
true, // bubbles
true, // cancelable
window, // view
1, // detail
touch.screenX, // screenX
touch.screenY, // screenY
touch.clientX, // clientX
touch.clientY, // clientY
touch.screenX / zoomRatio, // screenX
touch.screenY / zoomRatio, // screenY
touch.clientX / zoomRatio, // clientX
touch.clientY / zoomRatio, // clientY
false, // ctrlKey
false, // altKey
false, // shiftKey
Expand Down Expand Up @@ -157,4 +160,4 @@
_mouseInit.call(self);
};

})(jQuery);
})(jQuery);