ondras / rot.js

ROguelike Toolkit in JavaScript. Cool dungeon-related stuff, interactive manual, documentation, tests!
https://ondras.github.io/rot.js/hp/
BSD 3-Clause "New" or "Revised" License
2.33k stars 254 forks source link

Make eventToPosition scale to client dimensions #85

Closed tps12 closed 8 years ago

tps12 commented 8 years ago

Couldn't figure out how to write a spec for this, but it comes into play when the container canvas is scaled with a percentage value. The change can be seen comparing

original: http://tps12.github.io/rot.js/scale-demo-original.html

to

modified: http://tps12.github.io/rot.js/scale-demo-modified.html

ondras commented 8 years ago

Very nice, thanks!