Skip to content

Commit

Permalink
Don't scale touches since scaling is visual only.
Browse files Browse the repository at this point in the history
  • Loading branch information
soulwire committed Nov 25, 2016
1 parent 8fef1db commit a0da61c
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions js/sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@

target.width = w + suffix;

if ( is2D && !context.autoclear )

context.scale( ratio, ratio );

if ( setup ) trigger( context.resize );
}

Expand All @@ -313,13 +317,6 @@
touch.x = touch.pageX - bounds.left - (win.scrollX || win.pageXOffset);
touch.y = touch.pageY - bounds.top - (win.scrollY || win.pageYOffset);

if ( context.retina && is2D && ratio ) {

touch.x *= ratio;
touch.y *= ratio;

}

return touch;
}

Expand Down

0 comments on commit a0da61c

Please sign in to comment.