[OpenLayers-Trac] [OpenLayers] #1107: handlers have to check if layer exists before destroying it
OpenLayers
trac at openlayers.org
Thu Nov 1 09:12:09 EDT 2007
#1107: handlers have to check if layer exists before destroying it
----------------------+-----------------------------------------------------
Reporter: pgiraud | Owner:
Type: bug | Status: new
Priority: minor | Milestone: 2.6 Release
Component: general | Version: 2.5
Resolution: | Keywords: review
----------------------+-----------------------------------------------------
Comment (by elemoine):
Replying to [comment:3 pgiraud]:
> I can confirm that all tests pass on IE6 win and FF linux.
I'm in favour for this patch.
Just one comment though: you use layer.map to check whether the layer was
destroyed or not. Rigorously, layer.map == null doesn't mean that the
layer was destroyed, it means that the layer isn't added to the map. In
the Handler.Point and Handler.!RegularPolygon cases, we're assured that
the layer was destroyed if layer.map is null bause the handlers themselves
call addLayer(). For other cases, I think we should introduce a destroyed
property and possibly a isDestroyed() method to the Layer class.
--
Ticket URL: <http://trac.openlayers.org/ticket/1107#comment:4>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer
More information about the Trac
mailing list