Ticket #788 (closed bug: fixed)
Control displayClass is not correct if CLASS_NAME contains >= 2 periods
| Reported by: | fredj | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.5 Release |
| Component: | Control | Version: | SVN |
| Keywords: | Cc: | ||
| State: |
Description
From Glen Stampoultzis (to the dev mailing list):
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, "");
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

