Ticket #2137 (closed feature: fixed)
Handler class constructor optimization
| Reported by: | dziastinux | Owned by: | tschaub |
|---|---|---|---|
| Priority: | critical | Milestone: | 2.10 Release |
| Component: | Handler | Version: | SVN |
| Keywords: | Cc: | dziastinux@… | |
| State: | Complete |
Description
Recently I was analyzing how handlers work and found interesting block of code:
/openlayers/lib/OpenLayers/Handler.js:
102 initialize: function(control, callbacks, options) {
103 OpenLayers.Util.extend(this, options);
104 this.control = control;
105 this.callbacks = callbacks;
106 if (control.map) {
107 this.setMap(control.map);
108 }
109
110 OpenLayers.Util.extend(this, options);
111
112 this.id = OpenLayers.Util.createUniqueID(this.CLASS_NAME + "_");
113 },
For my opinion code at line 110 is redundant. Correct me if I am wrong.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

