[OpenLayers-Trac] [OpenLayers] #1034: OpenLayers.Util.pagePosition regression

OpenLayers trac at openlayers.org
Wed Oct 3 11:17:42 EDT 2007


#1034: OpenLayers.Util.pagePosition regression
------------------------+---------------------------------------------------
  Reporter:  crschmidt  |       Owner:             
      Type:  bug        |      Status:  new        
  Priority:  minor      |   Milestone:  2.5 Release
 Component:  Util       |     Version:  2.5 RC3    
Resolution:             |    Keywords:             
------------------------+---------------------------------------------------
Comment (by crschmidt):

 evt.object is the JS object that the events are registered on -- *not* a
 DOM element.

 in your particular code, you create your events like:

 new OL.Events(this, ...)

 Which means that evt.object is null.

 The thing you want to call pagePosition on is evt.*element*, which is a
 DOM element that the event is registered on.

 I'm not really sure how the code could have worked before -- it seems like
 it probably would have just always returned 0,0. However, the fact that
 this throws an error now is a regression, and we'll fix it -- but you
 should be aware that this function is probably not doing what you think it
 is (and change your application appropriately).

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


More information about the Trac mailing list