dineshkummarc / cakejs

Automatically exported from code.google.com/p/cakejs
0 stars 0 forks source link

Picking fails on canvases in position:fixed elements on a scrolled document #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a cake canvas that is a child of positon:fixed element.  Make sure 
the document extents go beyond the window extents so that you can scroll away 
from the origin.
2. Populate the canvas with something to pick.
3. Use the browser to scroll the page.  The canvas should stay fixed in its 
position relative to the window origin.
4. Attempt pick an object in the canvas.

What is the expected output? What do you see instead?

The pickable CakeNode should be picked if you have a mouse over it.  The pick 
will miss, however.  I traced this issue down to the Mouse.getRelativeCoords.  
It does not appear to take into account offsets due to fixed positioning.  I am 
working around the issue by overriding getRelativeCoords with function that 
uses jQuery's .offset() method.

What version of the product are you using? On what operating system?
I grabbed the latest revision as of March 26, 2012. (Rev 84, probably)

I'm running on OSX 10.7.  The problem was reproducible in both Firefox 11.0 and 
Chrome 17

Please provide any additional information below.

Original issue reported on code.google.com by k.evan.n...@gmail.com on 28 Mar 2012 at 12:06