{"action":"created","issue":{"url":"https://api.github.com/repos/backspaces/agentscript/issues/84","labels_url":"https://api.github.com/repos/backspaces/agentscript/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/backspaces/agentscript/issues/84/comments","events_url":"https://api.github.com/repos/backspaces/agentscript/issues/84/events","html_url":"https://github.com/backspaces/agentscript/issues/84","id":60143806,"number":84,"title":"mouse move doesn't work on with tiledata model","user":{"login":"m0ose","id":393666,"avatar_url":"https://avatars.githubusercontent.com/u/393666?v=3","gravatar_id":"","url":"https://api.github.com/users/m0ose","html_url":"https://github.com/m0ose","followers_url":"https://api.github.com/users/m0ose/followers","following_url":"https://api.github.com/users/m0ose/following{/other_user}","gists_url":"https://api.github.com/users/m0ose/gists{/gist_id}","starred_url":"https://api.github.com/users/m0ose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m0ose/subscriptions","organizations_url":"https://api.github.com/users/m0ose/orgs","repos_url":"https://api.github.com/users/m0ose/repos","events_url":"https://api.github.com/users/m0ose/events{/privacy}","received_events_url":"https://api.github.com/users/m0ose/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-06T19:03:37Z","updated_at":"2015-03-06T19:08:24Z","closed_at":null,"body":"I modified the tiledroplets demo to drop rain under the mouse and realized that it was returning the wrong patch under the mouse\r\n```\r\n this.patches.on ('mousemove', function(mouseEvent) {\r\n                    console.log('.')\r\n                    agent = mouseEvent.target\r\n                    agent.sprout(1)\r\n                    console.log( agent.x, agent.y)\r\n                    console.log( mouseEvent.originalEvent.offsetX, mouseEvent.originalEvent.offsetY)\r\n                    console.log( mouseEvent.originalEvent)\r\n                }.bind(this))\r\n\r\n```\r\nI think the problem comes from https://github.com/backspaces/agentscript/blob/master/lib/mouse.js#L79-L80 using offsetX and offsetY. It seems to be returning a position relative to the tile image instead of the whole viewport.  Maybe pageX/pageY would be better.\r\n"},"comment":{"url":"https://api.github.com/repos/backspaces/agentscript/issues/comments/77616619","html_url":"https://github.com/backspaces/agentscript/issues/84#issuecomment-77616619","issue_url":"https://api.github.com/repos/backspaces/agentscript/issues/84","id":77616619,"user":{"login":"bennlich","id":704368,"avatar_url":"https://avatars.githubusercontent.com/u/704368?v=3","gravatar_id":"","url":"https://api.github.com/users/bennlich","html_url":"https://github.com/bennlich","followers_url":"https://api.github.com/users/bennlich/followers","following_url":"https://api.github.com/users/bennlich/following{/other_user}","gists_url":"https://api.github.com/users/bennlich/gists{/gist_id}","starred_url":"https://api.github.com/users/bennlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bennlich/subscriptions","organizations_url":"https://api.github.com/users/bennlich/orgs","repos_url":"https://api.github.com/users/bennlich/repos","events_url":"https://api.github.com/users/bennlich/events{/privacy}","received_events_url":"https://api.github.com/users/bennlich/received_events","type":"User","site_admin":false},"created_at":"2015-03-06T19:08:24Z","updated_at":"2015-03-06T19:08:24Z","body":"Do you have a local copy of agentscript you can build? Can you see if your fix works?"}}