jeromeetienne / virtualjoystick.js

a virtual joystick library to emulate a joystick on touch screen in javascript
http://jeromeetienne.github.com/virtualjoystick.js/examples/basic.html
MIT License
419 stars 125 forks source link

Added support to limit joystick activity to an area #25

Closed h3rb closed 10 years ago

h3rb commented 10 years ago

Basically added the simplest form, where the region can be defined by x,y,w,h to limit the joystick's activity to said region since it did not default to its container. Can be turned on/off with option limitToRegion

Also added some semicolons(;) but then the code was tabulated a little odd by github's editor, alas.

jeromeetienne commented 10 years ago

this feature is already possible thru 'touchStartValidation'. see dual.html

https://github.com/jeromeetienne/virtualjoystick.js/blob/master/examples/dual.html

h3rb commented 10 years ago

It's not the same feature