[OpenLayers-Trac] [OpenLayers] #1400: pan/zoom panels

OpenLayers trac at openlayers.org
Mon Jun 30 18:42:48 EDT 2008


#1400: pan/zoom panels
------------------------+---------------------------------------------------
  Reporter:  crschmidt  |       Owner:             
      Type:  task       |      Status:  new        
  Priority:  minor      |   Milestone:  2.7 Release
 Component:  Control    |     Version:  2.5        
Resolution:             |    Keywords:             
     State:  Commit     |  
------------------------+---------------------------------------------------
Comment (by euzuro):

 some things i notice about this patch:

 1) @requires OpenLayers/Control/Control.js

 (should be OpenLayers/Control.js, no?)

 2) Engrish: "The type of OpenLayers.Control -- When are added to a
 Control.Panel the panel uses this to determine how to handle our events"

 3) Constants


 {{{
 OpenLayers.Control.PanButton.NORTH = "NORTH";
 OpenLayers.Control.PanButton.SOUTH = "SOUTH";
 OpenLayers.Control.PanButton.EAST = "EAST";
 OpenLayers.Control.PanButton.WEST = "WEST";
 }}}

 ... what if you set them instead as this:

 {{{
 OpenLayers.Control.PanButton.NORTH = "North";
 OpenLayers.Control.PanButton.SOUTH = "South";
 OpenLayers.Control.PanButton.EAST = "East";
 OpenLayers.Control.PanButton.WEST = "West";
 }}}

 then this:

 {{{
      switch(this.direction){
              case OpenLayers.Control.PanButton.NORTH:
                  this.CLASS_NAME += "North";
                  break;
              case OpenLayers.Control.PanButton.SOUTH:
                  this.CLASS_NAME += "South";
                  break;
              case OpenLayers.Control.PanButton.EAST:
                  this.CLASS_NAME += "East";
                  break;
              case OpenLayers.Control.PanButton.WEST:
                  this.CLASS_NAME += "West";
                  break;
          }
 }}}

 ... could become this:

 {{{
          this.CLASS_NAME += this.direction;
 }}}

 4) tabs


 ... see forthcoming patch

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


More information about the Trac mailing list