I just edited your awesome example a little and wanna share it with you and everyone.
Firstly added two events :
by doing so you dont need to worry about moving the board around.
Secondly changed touch handling a bit:
now the user doesn't needs to release mouse or his/her finger to see the result.
Game looked a little buggy in touch screen devices, when user needed to release his/her finger to see result.