OpenLayers OpenLayers

Changeset 6412

Show
Ignore:
Timestamp:
02/29/08 01:16:01 (11 months ago)
Author:
tschaub
Message:

updating and reminding myself again that typeof null is object

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/tschaub/events/lib/OpenLayers/Control.js

    r6276 r6412  
    165165         
    166166        this.events = new OpenLayers.Events(this, null, this.EVENT_TYPES); 
    167         if(typeof this.eventListeners == "object") { 
     167        if(this.eventListeners instanceof Object) { 
    168168            this.events.on(this.eventListeners); 
    169169        } 
  • sandbox/tschaub/events/lib/OpenLayers/Layer.js

    r6378 r6412  
    282282            this.events = new OpenLayers.Events(this, this.div,  
    283283                                                this.EVENT_TYPES); 
    284             if(typeof this.eventListeners == "object") { 
     284            if(this.eventListeners instanceof Object) { 
    285285                this.events.on(this.eventListeners); 
    286286            } 
  • sandbox/tschaub/events/lib/OpenLayers/Map.js

    r6409 r6412  
    336336 
    337337    /** 
     338     * Property: panMethod 
     339     * {Function} The Easing function to be used for tweening.  Default is 
     340     * OpenLayers.Easing.Expo.easeOut. Setting this to 'null' turns off 
     341     * animated panning. 
     342     */ 
     343    panMethod: OpenLayers.Easing.Expo.easeOut, 
     344     
     345    /** 
    338346     * Constructor: OpenLayers.Map 
    339347     * Constructor for a new OpenLayers.Map instance. 
     
    399407                                            this.fallThrough); 
    400408        this.updateSize(); 
    401         if(typeof this.eventListeners == "object") { 
     409        if(this.eventListeners instanceof Object) { 
    402410            this.events.on(this.eventListeners); 
    403411        } 
     
    13301338     */ 
    13311339    panTo: function(lonlat) { 
    1332         if (this.getExtent().containsLonLat(lonlat)) { 
     1340        if (this.panMethod && this.getExtent().containsLonLat(lonlat)) { 
    13331341            if (!this.panTween) { 
    1334                 this.panTween = new OpenLayers.Tween(OpenLayers.Easing.Expo.easeOut); 
     1342                this.panTween = new OpenLayers.Tween(this.panMethod); 
    13351343            } 
    13361344            var center = this.getCenter();