OpenLayers OpenLayers

Changeset 3545

Show
Ignore:
Timestamp:
06/29/07 11:59:20 (1 year ago)
Author:
crschmidt
Message:

Merge all changes from the naturaldocs sandbox. This brings all the work that
has been done in the NaturalDocs branch back to trunk. Thanks to everyone who
helped out in making this happen. (I could list people, but the list would
be long, and I'm already mentally on vacation.)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers.js

    r3543 r3545  
    77 */  
    88 
    9 //// 
    10 /// This blob sucks in all the files in uncompressed form for ease of use 
    11 /// 
    129(function() { 
    1310    /** 
     
    1815     */ 
    1916    var singleFile = (typeof OpenLayers == "object" && OpenLayers.singleFile); 
     17     
    2018    /** 
     19     * Namespace: OpenLayers 
    2120     * The OpenLayers object provides a namespace for all things OpenLayers 
    22      * @type Object 
    2321     */ 
    2422    OpenLayers = { 
    2523         
    2624        /** 
    27          * @type String 
    28          * @private 
     25         * Property: _scriptName 
     26         * {String} Relative path of this script. 
    2927         */ 
    3028        _scriptName: (!singleFile) ? "lib/OpenLayers.js" : "OpenLayers.js", 
    3129 
    3230        /** 
    33          * @type String 
    34          * @returns Path to this script 
    35          * @private 
     31         * Function: _getScriptLocation 
     32         * Return the path to this script. 
     33         * 
     34         * Return: 
     35         * Path to this script 
    3636         */ 
    3737        _getScriptLocation: function () { 
     
    185185    } 
    186186})(); 
     187 
     188/** 
     189 * Constant: VERSION_NUMBER 
     190 */ 
    187191OpenLayers.VERSION_NUMBER="$Revision$"; 
  • trunk/openlayers/lib/OpenLayers/Ajax.js

    r3347 r3545  
    3838}; 
    3939 
    40 /** Background load a document 
    41 
    42 * @param {String} uri URI of source doc 
    43 * @param {String} params Params on get (doesnt seem to work) 
    44 * @param {Object} caller object which gets callbacks 
    45 * @param {Function} onComplete callback for success 
    46 * @param {Function} onFailure callback for failure 
    47 
    48 * Both callbacks optional (though silly) 
    49 */ 
     40/**  
     41 * Function: loadURL 
     42 * Background load a document. 
     43 * 
     44 * Parameters: 
     45 * uri - {String} URI of source doc 
     46 * params - {String} Params on get (doesnt seem to work) 
     47 * caller - {Object} object which gets callbacks 
     48 * onComplete - {Function} callback for success 
     49 * onFailure - {Function} callback for failure 
     50 * 
     51 * Both callbacks optional (though silly) 
     52 */ 
    5053OpenLayers.loadURL = function(uri, params, caller, 
    5154                                  onComplete, onFailure) { 
     
    7174}; 
    7275 
    73 /** Parse XML into a doc structure 
    74 * @param {String} text 
    75 
    76 * @returns Parsed Ajax Response ?? 
    77 * @type ? 
    78 */ 
     76/**  
     77 * Function: parseXMLString 
     78 * Parse XML into a doc structure 
     79 *  
     80 * Parameters: 
     81 * text - {String}  
     82 *  
     83 * Return: 
     84 * {?} Parsed AJAX Responsev 
     85 */ 
    7986OpenLayers.parseXMLString = function(text) { 
    8087 
     
    109116}; 
    110117 
     118 
     119/** 
     120 * Namespace: OpenLayers.Ajax 
     121 */ 
    111122OpenLayers.Ajax = { 
    112   emptyFunction: function () {}, 
    113  
    114   getTransport: function() { 
    115     return OpenLayers.Util.Try( 
    116       function() {return new ActiveXObject('Msxml2.XMLHTTP')}, 
    117       function() {return new ActiveXObject('Microsoft.XMLHTTP')}, 
    118       function() {return new XMLHttpRequest()} 
    119     ) || false; 
    120   }, 
    121  
    122   activeRequestCount: 0 
    123 }; 
    124  
     123 
     124    /** 
     125     * Method: emptyFunction 
     126     */ 
     127    emptyFunction: function () {}, 
     128 
     129    /** 
     130     * Method: getTransport 
     131     *  
     132     * Return:  
     133     * {Object} Transport mechanism for whichever browser we're in, or false if 
     134     *          none available. 
     135     */ 
     136    getTransport: function() { 
     137        return OpenLayers.Util.Try( 
     138            function() {return new ActiveXObject('Msxml2.XMLHTTP')}, 
     139            function() {return new ActiveXObject('Microsoft.XMLHTTP')}, 
     140            function() {return new XMLHttpRequest()} 
     141        ) || false; 
     142    }, 
     143 
     144    /** 
     145     * Property: activeRequestCount 
     146     * {Integer} 
     147     */ 
     148    activeRequestCount: 0 
     149}; 
     150 
     151/** 
     152 * Namespace: OpenLayers.Ajax.Responders 
     153 * {Object} 
     154 */ 
    125155OpenLayers.Ajax.Responders = { 
    126   responders: [], 
    127  
    128   register: function(responderToAdd) { 
    129     for (var i = 0; i < this.responders.length; i++) 
    130         if (responderToAdd == this.responders[i]) 
    131             return; 
    132     this.responders.push(responderToAdd); 
    133   }, 
    134  
    135   dispatch: function(callback, request, transport, json) { 
    136     for (var i = 0; i < this.responders.length; i++) { 
    137       responder = this.responders[i]; 
    138       if (responder[callback] && typeof responder[callback] == 'function') { 
    139         try { 
    140           responder[callback].apply(responder, [request, transport, json]); 
    141         } catch (e) {} 
    142       } 
     156   
     157    /** 
     158     * Property: responders 
     159     * {Array} 
     160     */ 
     161    responders: [], 
     162 
     163    /** 
     164     * Method: register 
     165     *   
     166     * Parameters: 
     167     * responderToAdd - {?} 
     168     */ 
     169    register: function(responderToAdd) { 
     170      for (var i = 0; i < this.responders.length; i++) 
     171          if (responderToAdd == this.responders[i]) 
     172              return; 
     173      this.responders.push(responderToAdd); 
     174    }, 
     175 
     176    /** 
     177     * Method: dispatch 
     178     *  
     179     * Parameters: 
     180     * callback - {?} 
     181     * request - {?} 
     182     * transport - {?} 
     183     * json - {?} 
     184     */ 
     185    dispatch: function(callback, request, transport, json) { 
     186        for (var i = 0; i < this.responders.length; i++) { 
     187            responder = this.responders[i]; 
     188      
     189            if (responder[callback] &&  
     190                typeof responder[callback] == 'function') { 
     191                try { 
     192                    responder[callback].apply(responder,  
     193                                              [request, transport, json]); 
     194                } catch (e) {} 
     195            } 
     196        } 
    143197    } 
    144   } 
    145198}; 
    146199 
    147200OpenLayers.Ajax.Responders.register({ 
    148   onCreate: function() { 
    149     OpenLayers.Ajax.activeRequestCount++; 
    150   }, 
    151  
    152   onComplete: function() { 
    153     OpenLayers.Ajax.activeRequestCount--; 
    154   } 
     201    /**  
     202     * Function: onCreate 
     203     */ 
     204    onCreate: function() { 
     205        OpenLayers.Ajax.activeRequestCount++; 
     206    }, 
     207 
     208    /** 
     209     * Function: onComplete 
     210     */ 
     211     onComplete: function() { 
     212         OpenLayers.Ajax.activeRequestCount--; 
     213     } 
    155214}); 
    156215 
     216/** 
     217 * Namespace: OpenLayers.Ajax.Base 
     218 * {Object} 
     219 */ 
    157220OpenLayers.Ajax.Base = function() {}; 
    158221OpenLayers.Ajax.Base.prototype = { 
    159   setOptions: function(options) { 
    160     this.options = { 
    161       method:       'post', 
    162       asynchronous: true, 
    163       parameters:   '' 
     222 
     223    /** 
     224     * Function: setOptions 
     225     *  
     226     * Parameters: 
     227     * options - {Object} 
     228     */ 
     229    setOptions: function(options) { 
     230        this.options = { 
     231            'method': 'post', 
     232            'asynchronous': true, 
     233            'parameters': '' 
     234        }; 
     235        OpenLayers.Util.extend(this.options, options || {}); 
     236    }, 
     237 
     238    /** 
     239     * Function: responseIsSuccess 
     240     *  
     241     * Return: 
     242     * {Boolean} 
     243     */ 
     244    responseIsSuccess: function() { 
     245        return this.transport.status == undefined ||  
     246               this.transport.status == 0 ||  
     247               (this.transport.status >= 200 && this.transport.status < 300); 
     248    }, 
     249 
     250    /** 
     251     * Function: responseIsFailure 
     252     *  
     253     * Return: 
     254     * {Boolean} 
     255     */ 
     256    responseIsFailure: function() { 
     257        return !this.responseIsSuccess(); 
    164258    } 
    165     OpenLayers.Util.extend(this.options, options || {}); 
    166   }, 
    167  
    168   responseIsSuccess: function() { 
    169     return this.transport.status == undefined 
    170         || this.transport.status == 0 
    171         || (this.transport.status >= 200 && this.transport.status < 300); 
    172   }, 
    173  
    174   responseIsFailure: function() { 
    175     return !this.responseIsSuccess(); 
    176   } 
    177 
    178  
     259}; 
     260 
     261/** 
     262 * Class: OpenLayers.Ajax.Request 
     263 * 
     264 * Inherit: 
     265 *  - <OpenLayers.Ajax.Base> 
     266 */ 
    179267OpenLayers.Ajax.Request = OpenLayers.Class.create(); 
     268 
     269/**  
     270 * Property: Events 
     271 * {Array(String)} 
     272 */ 
    180273OpenLayers.Ajax.Request.Events = 
    181274  ['Uninitialized', 'Loading', 'Loaded', 'Interactive', 'Complete']; 
    182275 
    183 OpenLayers.Ajax.Request.prototype = OpenLayers.Class.inherit( OpenLayers.Ajax.Base, { 
    184   initialize: function(url, options) { 
    185     this.transport = OpenLayers.Ajax.getTransport(); 
    186     this.setOptions(options); 
    187     this.request(url); 
    188   }, 
    189  
    190   request: function(url) { 
    191     var parameters = this.options.parameters || ''; 
    192     if (parameters.length > 0) parameters += '&_='; 
    193  
    194     try { 
    195       this.url = url; 
    196       if (this.options.method == 'get' && parameters.length > 0) 
    197         this.url += (this.url.match(/\?/) ? '&' : '?') + parameters; 
    198  
    199       OpenLayers.Ajax.Responders.dispatch('onCreate', this, this.transport); 
    200  
    201       this.transport.open(this.options.method, this.url, 
    202         this.options.asynchronous); 
    203  
    204       if (this.options.asynchronous) { 
    205         this.transport.onreadystatechange = this.onStateChange.bind(this); 
    206         setTimeout((function() {this.respondToReadyState(1)}).bind(this), 10); 
    207       } 
    208  
    209       this.setRequestHeaders(); 
    210  
    211       var body = this.options.postBody ? this.options.postBody : parameters; 
    212       this.transport.send(this.options.method == 'post' ? body : null); 
    213  
    214       /* Force Firefox to handle ready state 4 for synchronous requests */ 
    215       if (!this.options.asynchronous && this.transport.overrideMimeType) { 
    216           this.onStateChange(); 
    217       } 
    218  
    219     } catch (e) { 
    220       this.dispatchException(e); 
     276OpenLayers.Ajax.Request.prototype =  
     277  OpenLayers.Class.inherit( OpenLayers.Ajax.Base, { 
     278       
     279      /** 
     280       * Constructor: OpenLayers.Ajax.Request 
     281       *  
     282       * Parameters:  
     283       * url - {String} 
     284       * options - {Object} 
     285       */ 
     286    initialize: function(url, options) { 
     287        this.transport = OpenLayers.Ajax.getTransport(); 
     288        this.setOptions(options); 
     289        this.request(url); 
     290    }, 
     291 
     292    /** 
     293     * Method: request 
     294     *  
     295     * Parameters: 
     296     * url - {String} 
     297     */ 
     298    request: function(url) { 
     299        var parameters = this.options.parameters || ''; 
     300        if (parameters.length > 0) parameters += '&_='; 
     301     
     302        try { 
     303            this.url = url; 
     304            if (this.options.method == 'get' && parameters.length > 0) { 
     305               this.url += (this.url.match(/\?/) ? '&' : '?') + parameters; 
     306            } 
     307             
     308            OpenLayers.Ajax.Responders.dispatch('onCreate',  
     309                                                this,  
     310                                                this.transport); 
     311     
     312            this.transport.open(this.options.method,  
     313                                this.url, 
     314                                this.options.asynchronous); 
     315     
     316            if (this.options.asynchronous) { 
     317                this.transport.onreadystatechange =  
     318                    this.onStateChange.bind(this); 
     319                 
     320                setTimeout((function() { 
     321                    this.respondToReadyState(1) 
     322                }).bind(this), 10); 
     323            } 
     324     
     325            this.setRequestHeaders(); 
     326     
     327            var body = this.options.postBody ? this.options.postBody  
     328                                             : parameters; 
     329            this.transport.send(this.options.method == 'post' ? body : null); 
     330     
     331            // Force Firefox to handle ready state 4 for synchronous requests 
     332            if (!this.options.asynchronous &&  
     333                this.transport.overrideMimeType) { 
     334                 
     335                this.onStateChange(); 
     336            } 
     337     
     338        } catch (e) { 
     339            this.dispatchException(e); 
     340        } 
     341    }, 
     342      
     343    /** 
     344     * Method: setRequestHeaders 
     345     */ 
     346    setRequestHeaders: function() { 
     347        var requestHeaders = [ 
     348            'X-Requested-With', 
     349            'XMLHttpRequest', 
     350            'X-Prototype-Version', 
     351            'OpenLayers' 
     352        ]; 
     353     
     354        if (this.options.method == 'post' && !this.options.postBody) { 
     355            requestHeaders.push('Content-type', 
     356                                'application/x-www-form-urlencoded'); 
     357     
     358            // Force "Connection: close" for Mozilla browsers to work around 
     359            // a bug where XMLHttpReqeuest sends an incorrect Content-length 
     360            // header. See Mozilla Bugzilla #246651. 
     361            if (this.transport.overrideMimeType) { 
     362                requestHeaders.push('Connection', 'close'); 
     363            } 
     364        } 
     365     
     366        if (this.options.requestHeaders) { 
     367            requestHeaders.push.apply(requestHeaders,  
     368                                      this.options.requestHeaders); 
     369        } 
     370           
     371        for (var i = 0; i < requestHeaders.length; i += 2) { 
     372            this.transport.setRequestHeader(requestHeaders[i],  
     373                                            requestHeaders[i+1]); 
     374        } 
     375    }, 
     376 
     377    /** 
     378     * Method: onStateChange 
     379     */ 
     380    onStateChange: function() { 
     381        var readyState = this.transport.readyState; 
     382        if (readyState != 1) { 
     383          this.respondToReadyState(this.transport.readyState); 
     384        } 
     385    }, 
     386 
     387    /**  
     388     * Method: header 
     389     *  
     390     * Return: 
     391     * {?} 
     392     */ 
     393    header: function(name) { 
     394        try { 
     395            return this.transport.getResponseHeader(name); 
     396        } catch (e) {} 
     397    }, 
     398 
     399    /**  
     400     * Method: evalJSON 
     401     *  
     402     * Return: 
     403     * {?} 
     404     */ 
     405    evalJSON: function() { 
     406        try { 
     407            return eval(this.header('X-JSON')); 
     408        } catch (e) {} 
     409    }, 
     410 
     411    /** 
     412     * Method: evalResponse 
     413     *  
     414     * Return:  
     415     * {?} 
     416     */ 
     417    evalResponse: function() { 
     418        try { 
     419            return eval(this.transport.responseText); 
     420        } catch (e) { 
     421            this.dispatchException(e); 
     422        } 
     423    }, 
     424 
     425    /** 
     426     * Method: respondToReadyState 
     427     * 
     428     * Parameters: 
     429     * readyState - {?} 
     430     */ 
     431    respondToReadyState: function(readyState) { 
     432        var event = OpenLayers.Ajax.Request.Events[readyState]; 
     433        var transport = this.transport, json = this.evalJSON(); 
     434     
     435        if (event == 'Complete') { 
     436            try { 
     437                var responseSuccess = this.responseIsSuccess() ? 'Success' 
     438                                                                : 'Failure'; 
     439                                                                  
     440                (this.options['on' + this.transport.status] || 
     441                 this.options['on' + responseSuccess] || 
     442                 OpenLayers.Ajax.emptyFunction)(transport, json); 
     443            } catch (e) { 
     444                this.dispatchException(e); 
     445            } 
     446     
     447            var contentType = this.header('Content-type') || ''; 
     448            if (contentType.match(/^text\/javascript/i)) { 
     449                this.evalResponse(); 
     450            } 
     451        } 
     452     
     453        try { 
     454            (this.options['on' + event] ||  
     455             OpenLayers.Ajax.emptyFunction)(transport, json); 
     456             OpenLayers.Ajax.Responders.dispatch('on' + event,  
     457                                                 this,  
     458                                                 transport,  
     459                                                 json); 
     460        } catch (e) { 
     461            this.dispatchException(e); 
     462        } 
     463     
     464        // Avoid memory leak in MSIE: clean up the oncomplete event handler 
     465        if (event == 'Complete') { 
     466            this.transport.onreadystatechange = OpenLayers.Ajax.emptyFunction; 
     467        } 
     468    }, 
     469 
     470    /** 
     471     * Method: dispatchException 
     472     *  
     473     * Parameters: 
     474     * exception - {?} 
     475     */ 
     476    dispatchException: function(exception) { 
     477        if (this.options.onException) { 
     478            this.options.onException(this, exception); 
     479        } else { 
     480            // if we get here, Responders.dispatch('onException') will never 
     481            // be called. too bad. we should probably take out the Responders 
     482            // stuff anyway. 
     483            throw exception; 
     484        } 
     485        OpenLayers.Ajax.Responders.dispatch('onException', this, exception); 
    221486    } 
    222   }, 
    223  
    224   setRequestHeaders: function() { 
    225     var requestHeaders = 
    226       ['X-Requested-With', 'XMLHttpRequest', 
    227        'X-Prototype-Version', 'OpenLayers']; 
    228  
    229     if (this.options.method == 'post' && !this.options.postBody) { 
    230       requestHeaders.push('Content-type', 
    231         'application/x-www-form-urlencoded'); 
    232  
    233       /* Force "Connection: close" for Mozilla browsers to work around 
    234        * a bug where XMLHttpReqeuest sends an incorrect Content-length 
    235        * header. See Mozilla Bugzilla #246651. 
    236        */ 
    237       if (this.transport.overrideMimeType) 
    238         requestHeaders.push('Connection', 'close'); 
     487     
     488}); 
     489 
     490/** 
     491 * Function: getElementsByTagNameNS 
     492 *  
     493 * Parameters: 
     494 * parentnode - {?} 
     495 * nsuri - {?} 
     496 * nsprefix - {?} 
     497 * tagname - {?} 
     498 *  
     499 * Return: 
     500 * {?} 
     501 */ 
     502OpenLayers.Ajax.getElementsByTagNameNS  = function(parentnode, nsuri,  
     503                                                   nsprefix, tagname) { 
     504    var elem = null; 
     505    if (parentnode.getElementsByTagNameNS) { 
     506        elem = parentnode.getElementsByTagNameNS(nsuri, tagname); 
     507    } else { 
     508        elem = parentnode.getElementsByTagName(nsprefix + ':' + tagname); 
    239509    } 
    240  
    241     if (this.options.requestHeaders) 
    242       requestHeaders.push.apply(requestHeaders, this.options.requestHeaders); 
    243  
    244     for (var i = 0; i < requestHeaders.length; i += 2) 
    245       this.transport.setRequestHeader(requestHeaders[i], requestHeaders[i+1]); 
    246   }, 
    247  
    248   onStateChange: function() { 
    249     var readyState = this.transport.readyState; 
    250     if (readyState != 1) 
    251       this.respondToReadyState(this.transport.readyState); 
    252   }, 
    253  
    254   header: function(name) { 
    255     try { 
    256       return this.transport.getResponseHeader(name); 
    257     } catch (e) {} 
    258   }, 
    259  
    260   evalJSON: function() { 
    261     try { 
    262       return eval(this.header('X-JSON')); 
    263     } catch (e) {} 
    264   }, 
    265  
    266   evalResponse: function() { 
    267     try { 
    268       return eval(this.transport.responseText); 
    269     } catch (e) { 
    270       this.dispatchException(e); 
    271     } 
    272   }, 
    273  
    274   respondToReadyState: function(readyState) { 
    275     var event = OpenLayers.Ajax.Request.Events[readyState]; 
    276     var transport = this.transport, json = this.evalJSON(); 
    277  
    278     if (event == 'Complete') { 
    279       try { 
    280         (this.options['on' + this.transport.status] 
    281          || this.options['on' + (this.responseIsSuccess() ? 'Success' : 'Failure')] 
    282          || OpenLayers.Ajax.emptyFunction)(transport, json); 
    283       } catch (e) { 
    284         this.dispatchException(e); 
    285       } 
    286  
    287       if ((this.header('Content-type') || '').match(/^text\/javascript/i)) 
    288         this.evalResponse(); 
    289     } 
    290  
    291     try { 
    292       (this.options['on' + event] || OpenLayers.Ajax.emptyFunction)(transport, json); 
    293       OpenLayers.Ajax.Responders.dispatch('on' + event, this, transport, json); 
    294     } catch (e) { 
    295       this.dispatchException(e); 
    296     } 
    297  
    298     /* Avoid memory leak in MSIE: clean up the oncomplete event handler */ 
    299     if (event == 'Complete') 
    300       this.transport.onreadystatechange = OpenLayers.Ajax.emptyFunction; 
    301   }, 
    302  
    303   dispatchException: function(exception) { 
    304     if (this.options.onException) { 
    305         this.options.onException(this, exception); 
    306     } else { 
    307         // if we get here, Responders.dispatch('onException') will never 
    308         // be called. too bad. we should probably take out the Responders 
    309         // stuff anyway. 
    310         throw exception; 
    311     } 
    312     OpenLayers.Ajax.Responders.dispatch('onException', this, exception); 
    313   } 
    314 }); 
    315  
    316 OpenLayers.Ajax.getElementsByTagNameNS  = function(parentnode, nsuri, nsprefix, tagname) { 
    317     return parentnode.getElementsByTagNameNS ? 
    318         parentnode.getElementsByTagNameNS(nsuri, tagname) 
    319         : parentnode.getElementsByTagName(nsprefix + ':' + tagname); 
    320 
    321  
    322 /** 
     510    return elem; 
     511}; 
     512 
     513 
     514/** 
     515 * Function: serializeXMLToString 
    323516 * Wrapper function around XMLSerializer, which doesn't exist/work in 
    324  * IE/Safari. We need to come up with a way to serialize in those browser: 
    325  * for now, these browsers will just fail. 
    326  * #535, #536 
    327  * 
    328  * @param {XMLNode} xmldom xml dom to serialize 
     517 *     IE/Safari. We need to come up with a way to serialize in those browser: 
     518 *     for now, these browsers will just fail. #535, #536 
     519 * 
     520 * Parameters:  
     521 * xmldom {XMLNode} xml dom to serialize 
     522 *  
     523 * Return: 
     524 * {?} 
    329525 */ 
    330526OpenLayers.Ajax.serializeXMLToString = function(xmldom) { 
  • trunk/openlayers/lib/OpenLayers/BaseTypes.js

    r3323 r3545  
    33 * for the full text of the license. */ 
    44 
    5  
    6 /* OpenLayers.Class metaclass */ 
     5/** 
     6 * Header: OpenLayers Base Types 
     7 * Basic types in OpenLayers are described here. 
     8 */ 
     9 
     10/** 
     11 * Namespace: OpenLayers.Class 
     12 * Contains functions to create OpenLayers style classes. 
     13 */  
    714OpenLayers.Class = { 
    815    isPrototype: function () {}, // magic anonymous value 
    916 
     17    /** 
     18     * APIFunction: create 
     19     * Create an OpenLayers style class 
     20     * 
     21     * Return: 
     22     * An OpenLayers class 
     23     */ 
    1024    create: function() { 
    1125        return function() { 
     
    1529    }, 
    1630  
     31    /** 
     32     * APIFunction: inherit 
     33     * Inherit from one or more OpenLayers style classes 
     34     * 
     35     * Parameters: 
     36     * class - One or more classes can be provided as arguments 
     37     * 
     38     * Return: 
     39     * An object prototype 
     40     */ 
    1741    inherit: function () { 
    1842        var superClass = arguments[0]; 
     
    5579 
    5680/** 
    57  * @class  
    58  *  
     81 * Class: OpenLayers.Pixel 
    5982 * This class represents a screen coordinate, in x and y coordinates 
    6083 */ 
     
    6285OpenLayers.Pixel.prototype = { 
    6386     
    64     /** @type float */ 
     87    /** 
     88     * APIProperty: x 
     89     * {Number} The x coordinate 
     90     */ 
    6591    x: 0.0, 
    6692 
    67     /** @type float */ 
     93    /** 
     94     * APIProperty: x 
     95     * {Number} The x coordinate 
     96     */ 
    6897    y: 0.0, 
    6998     
    70     /**  
    71     * @constructor 
    72     * 
    73     * @param {float} x 
    74     * @param {float} y 
    75     */ 
     99    /** 
     100     * Constructor: OpenLayers.Pixel 
     101     * Create a new OpenLayers.Pixel instance 
     102     * 
     103     * Parameters: 
     104     * x - {Number} The x coordinate 
     105     * y - {Number} The y coordinate 
     106     * 
     107     * Return: 
     108     * An instance of OpenLayers.Pixel 
     109     */ 
    76110    initialize: function(x, y) { 
    77111        this.x = parseFloat(x); 
     
    80114     
    81115    /** 
    82     * @return string representation of Pixel. ex: "x=200.4,y=242.2" 
    83     * @type str 
    84     */ 
     116     * Method: toString 
     117     * Cast this object into a string 
     118     * 
     119     * Return: 
     120     * {String} The string representation of Pixel. ex: "x=200.4,y=242.2" 
     121     */ 
    85122    toString:function() { 
    86123        return ("x=" + this.x + ",y=" + this.y); 
     
    88125 
    89126    /** 
    90      * @type OpenLayers.Pixel 
     127     * APIMethod: clone 
     128     * Return a clone of this pixel object 
     129     * 
     130     * Return: 
     131     * {<OpenLayers.Pixel>} A clone pixel 
    91132     */ 
    92133    clone:function() { 
     
    94135    }, 
    95136