[OpenLayers-Trac] [OpenLayers] #1187: ZoomBox control: add property mode with values zoomin/zoomout

OpenLayers trac at openlayers.org
Mon Jan 7 23:33:45 EST 2008


#1187: ZoomBox control: add property mode with values zoomin/zoomout
------------------------------+---------------------------------------------
  Reporter:  bartvde          |       Owner:             
      Type:  feature          |      Status:  new        
  Priority:  minor            |   Milestone:  2.6 Release
 Component:  Control          |     Version:  2.5        
Resolution:                   |    Keywords:  review     
     State:  Needs More Work  |  
------------------------------+---------------------------------------------
Comment (by tschaub):

 I don't want to drag this one out, but I will say that string values
 strike me the wrong way for some reason.  Elsewhere in the library, where
 we do have "mode" type properties, we typically use static (class)
 properties or constants as possible values (as in control.type =
 OpenLayers.Control.BUTTON).  I can't really imagine many more modes for
 the zoom box, so it seems to me that a boolean is appropriate (as in
 control.out = true).

 Don't know how others feel about this.  I think for me it's about
 remembering as little as possible.  If I want to make the zoom box go out,
 it makes sense that I'd set control.out to true (or maybe control.zoomout
 - but then I might forget if it is camel case or not).  Anyway, I'm not
 strongly opinionated about this.

 (Is it "forwards" or "forward" or maybe "foreword", is it "backwards" or
 "backward" or perhaps "backwoods"?  A smart editor might help with
 OpenLayers.Control.BUTTON, but it's not going to lend a hand with the
 spelling of "backwords".)

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


More information about the Trac mailing list