[OpenLayers-Trac] Re: [OpenLayers] #2247: getMousePosition off due to borders and relative/absolute positioning

OpenLayers trac-20090302 at openlayers.org
Thu Nov 4 06:12:47 EDT 2010


#2247: getMousePosition off due to borders and relative/absolute positioning
-----------------------------------------------------------------------------------------------+
 Reporter:  chrelad@…                                                                          |       Owner:  euzuro      
     Type:  bug                                                                                |      Status:  new         
 Priority:  critical                                                                           |   Milestone:  2.11 Release
Component:  Events                                                                             |     Version:  2.8         
 Keywords:  mouse position getMousePosition offset click coordinates border relative position  |       State:  Review      
-----------------------------------------------------------------------------------------------+

Comment(by erilem):

 Replying to [comment:9 ahocevar]:
 > @erilem: this surprises me: pagePosition should be more efficient in
 most cases, because it does not always have to bubble up the offsetParent
 hierachy. The only impact I could imagine would be the extra function call
 of getViewportElement in getMousePosition, but this should only be called
 once after scroll position or page size changes, and have no impact on
 drag performance. I'd be interested to hear where you experience extra
 overhead.

 I've also been surprised, with the same reasoning as you. I'll look into
 it in more detail, but I'm busy with more urgent matters right now.

-- 
Ticket URL: <http://trac.openlayers.org/ticket/2247#comment:10>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list