[OpenLayers-Trac] [OpenLayers] #1404: Specify event listeners at construction.
OpenLayers
trac at openlayers.org
Thu Mar 6 12:53:31 EST 2008
#1404: Specify event listeners at construction.
-----------------------+----------------------------------------------------
Reporter: tschaub | Owner: tschaub
Type: feature | Status: closed
Priority: minor | Milestone: 2.6 Release
Component: Events | Version: 2.5
Resolution: fixed | Keywords:
State: Complete |
-----------------------+----------------------------------------------------
Comment (by tschaub):
If this code were already in the trunk, I can imagine someone coming along
and saying "hey, I can remove 12 redundant lines of code from thee files."
I would consider that a good step.
All events.unregister does is splice out listeners from the listeners
array one at a time. The events.destroy method removes the reference to
the listeners array all at once. I don't see the point in doing a bunch
of splicing just two lines before you ditch the reference to the array.
No magic here that I can see.
--
Ticket URL: <http://trac.openlayers.org/ticket/1404#comment:18>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list