cykod / Quintus

HTML5 Game Engine
http://html5quintus.com
GNU General Public License v2.0
1.41k stars 401 forks source link

Fix Touch position in canvas with padding #121

Closed mpkorstanje closed 10 years ago

mpkorstanje commented 10 years ago

The mouse position in an element is measured from the top left corner. When a margin or padding is used this starts outside the drawable area of the canvas. This needs to be taken into account.

ghost commented 10 years ago

I asume this is the same problem as in https://github.com/cykod/Quintus/pull/120 So you only need to make the test sample for that one.