[OpenLayers-Dev] Very small issue

Glen Stampoultzis gstamp at gmail.com
Fri Jun 29 00:39:59 EDT 2007


In Control.js:

    /**
     * @constructor
     *
     * @param {Object} options
     */
    initialize: function (options) {
        // We do this before the extend so that instances can override
        // className in options.
        this.displayClass = this.CLASS_NAME.replace("OpenLayers.",
"ol").replace(".","");

        OpenLayers.Util.extend(this, options);

        this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
    },


the replace only replaces the first period.  Better would be something like
this:


this.displayClass = this.CLASS_NAME.replace("OpenLayers.",
"ol").replace(/\./g,"");



Regards,

Glen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-dev/attachments/20070629/f23199c0/attachment.html


More information about the Dev mailing list