[OpenLayers-Trac] Re: [OpenLayers] #3180: treat UI and non-UI controls differently

OpenLayers trac-20090302 at openlayers.org
Sun Feb 19 18:01:07 EST 2012


#3180: treat UI and non-UI controls differently
---------------------+------------------------------------------------------
 Reporter:  erilem   |       Owner:  elemoine    
     Type:  feature  |      Status:  new         
 Priority:  minor    |   Milestone:  2.12 Release
Component:  Control  |     Version:  2.10        
 Keywords:           |       State:              
---------------------+------------------------------------------------------

Comment(by jorix):

 Replying to [comment:5 erilem]:
 > I like this change, but I'm concerned with existing third-party controls
 that have "draw" functions that call Control.prototype.draw (which this
 patch removes). Maybe we could add something like this for backward
 compatibility:

  {{{
      draw: function() {
          this.div = this.createDiv();
      }
  }}}

 Ok, but in "Map.js":
 {{{
       if(typeof control.draw === 'function') {
             // dealing with a UI control
             var div = control.draw(px);
             ...
 }}}

 so this always would produce a div, which is what we are trying to
 avoid...

 not have this problem if this code is put into "deprecated.js", seem
 right?

 NOTE: I thought documenting {{{outsideViewport}}} and
 {{{displayProjection}}} properties in "Control.js"

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


More information about the Trac mailing list