[OpenLayers-Trac] [OpenLayers] #1125: Smoother dragging of the map on older computers

OpenLayers trac at openlayers.org
Sun Nov 11 03:26:04 EST 2007


#1125: Smoother dragging of the map on older computers
----------------------------------+-----------------------------------------
  Reporter:  haakeyar             |       Owner:  tschaub
      Type:  bug                  |      Status:  new    
  Priority:  minor                |   Milestone:         
 Component:  Control.DragFeature  |     Version:  SVN    
Resolution:                       |    Keywords:  review 
----------------------------------+-----------------------------------------
Comment (by elemoine):

 Replying to [comment:6 haakeyar]:
 > Replying to [comment:5 haakeyar]:
 > > A concern with both patches is that in the call to this.map.setCenter
 in panMap, the third argument is this.handler.dragging. The value of that
 could potentionally become false before the timeout is run. I have no idea
 what that argument does and why it is there in the first place (wouldn't
 it always be true?), but it will have to bee looked into. (If no one else
 does, I'll probably look into it on saturday.)
 > From the documentation on the third argument to setCenter:
 > "dragging     {Boolean} Specifies whether or not to trigger
 movestart/end events"
 > http://dev.openlayers.org/apidocs/files/OpenLayers/Map-
 js.html#OpenLayers.Map.setCenter
 >
 > So, I would guess that we could just set the third argument to true,
 since that's what it would have been if the action wasn't delayed (as far
 as I can see), but I might be wrong. I'll have to leave that to you
 hardcore OpenLayers developers.

 In addition to being called on move events, panMap() is also called from
 within panMapDone(). When called from within panMapDone(),
 this.handler.dragging is set to false since we're done panning. For that
 reason, we just can't set dragging to true.

 In addition, setCenter() dragging parameter doesn't only specify whether
 or not to trigger movestart/end events. The doc is a bit misleading with
 respect to that. See <http://trac.openlayers.org/ticket/967>.

 --
 Eric

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


More information about the Trac mailing list