Skip to content

Commit

Permalink
Merge pull request #4 from mucaho/patch-1
Browse files Browse the repository at this point in the history
Fix bug when using 0 as touch identifier
  • Loading branch information
sveisvei committed May 15, 2017
2 parents 3c2df75 + 3534f78 commit 3a5175e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Expand Up @@ -51,7 +51,7 @@ function createTouchList(target, list) {
list = list.map(function (entry, index) {
var x = entry[0];
var y = entry[1];
var id = entry[2] ? entry[2] : index + 1;
var id = entry[2] || index;
return createTouch(x, y, target, id);
});
return document.createTouchList.apply(document, list);
Expand All @@ -60,7 +60,7 @@ function createTouchList(target, list) {
function createTouch(x, y, target, id) {
return document.createTouch(window, target,
//identifier
id || 1,
id || 0,
//pageX / clientX
x,
//pageY / clientY
Expand Down

0 comments on commit 3a5175e

Please sign in to comment.