[OpenLayers-Trac] [OpenLayers] #1240: navigation history control

OpenLayers trac at openlayers.org
Mon Jan 7 13:12:39 EST 2008


#1240: navigation history control
----------------------+-----------------------------------------------------
  Reporter:  tschaub  |       Owner:             
      Type:  feature  |      Status:  new        
  Priority:  minor    |   Milestone:  2.6 Release
 Component:  Control  |     Version:  2.5        
Resolution:           |    Keywords:             
     State:           |  
----------------------+-----------------------------------------------------
Comment (by tschaub):

 The one remaining issue is what to do with an empty stack (in either
 direction).  It makes sense that you'd want to disable the next button
 when there are no more items in the next stack (or same with previous).

 Currently, next and previous return a representation of the state they are
 restoring.  If this is null, the stack is empty - so a button could
 disable itself if the return is null.  However, this  means there will be
 one click of the button that does nothing before the button is disabled.

 The real solution is for our controls to have events instances (or
 something similar).  Controls could register listeners for events like
 "previouschanged" or "nextchanged" where the listener would get the state
 representation and maybe the length of the remaining stack.

 Until then we're stuck with overriding methods like onPrevious or onNext
 (meaning that only one thing gets to "listen" to one control).  Any other
 ideas would be appreciated.

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


More information about the Trac mailing list