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

OpenLayers trac-20090302 at openlayers.org
Thu Nov 4 05:54:18 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 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.

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


More information about the Trac mailing list