[OpenLayers-Trac] [OpenLayers] #746: add() function should be tolerant to omitted y value

OpenLayers trac at openlayers.org
Fri Jun 29 13:29:39 EDT 2007


#746: add() function should be tolerant to omitted y value
----------------------+-----------------------------------------------------
  Reporter:  euzuro   |       Owner:             
      Type:  feature  |      Status:  new        
  Priority:  minor    |   Milestone:  2.5 Release
 Component:  general  |     Version:  2.4        
Resolution:           |    Keywords:             
----------------------+-----------------------------------------------------
Comment (by euzuro):

 Replying to [comment:2 crschmidt]:
 > Erik:
 >
 > I can go either way on this, but I think this is just an issue of
 documentation. Add with a single parameter has multiple possible
 interpretations -- for example, I would have assumed that it would add the
 same value to both properties, not to just the x value. Perhaps this is a
 case where it would make sense to do nothing, and report an error via
 OpenLayers.Console.error(), rather than adding in too much magic here.
 Does that seem like a valid behavior?
 >
 > Schuyler: Since you're -1, I'd like to hear what you propose as an
 alternative -- is what I mentioned above appropriate?


 yeah, you're probably right. the magic argument is a strong one. (as is
 the argument that your natural interpretation differs from mine ;-)). Have
 we any examples yet in the code of using the console.error()?

 I think this could be a good example.

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


More information about the Trac mailing list