Skip to content
Snippets Groups Projects
Commit 5ad43877 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

when event without native JS event is passed ignore it

parent d6e91a06
No related branches found
No related tags found
1 merge request!322Resolve "on touch device clicking on molart bar causes JS error"
Pipeline #
......@@ -69,10 +69,14 @@ GuiConnector.prototype.init = function () {
});
self._touchStartEvent = function (e) {
self.updateMouseCoordinates(e.originalEvent.touches[0].pageX, e.originalEvent.touches[0].pageY);
if (e.originalEvent !== undefined) {
self.updateMouseCoordinates(e.originalEvent.touches[0].pageX, e.originalEvent.touches[0].pageY);
}
};
self._touchMoveEvent = function (e) {
self.updateMouseCoordinates(e.originalEvent.touches[0].pageX, e.originalEvent.touches[0].pageY);
if (e.originalEvent !== undefined) {
self.updateMouseCoordinates(e.originalEvent.touches[0].pageX, e.originalEvent.touches[0].pageY);
}
};
// force browser to update mouse coordinates whenever mouse move
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment