See these lines: x=int((mouseX-20)/ n); y=int((mouseY-20)/n);
There is a bug in processing the mouseX and mouseY return wrong coordinates depending on the location of the canvas in the page. the "-20" fixes the offset for me. For you it may be different. On Jun 21, 11:44 am, Iceberg <[email protected]> wrote: > Thanks for sharing. But ... > > I put exactly same code on your page to a myapp/controllers/maze.py, > even use your version of processing.min.js, processing.init.js, > jquery.js, but it just does not work exactly the same as your demo. > When I click somewhere in the maze, say coordinate (x,y), my maze > reacts as if I am clicking another place at (x+blah, y+sth) > > Did I miss something? Thanks in advance. > > On Jun21, 6:20am, mdipierro <[email protected]> wrote: > > > source is NOW posted on the page > > > On Jun 17, 10:50 am, mdipierro <[email protected]> wrote: > > >http://www.web2py.com/mazes

