Ticket #2289 (new bug)
Function ''layer.destroyFeatures()'' doesn't call ''feature.destroy()'', although it is supposed to do so.
| Reported by: | pigletto | Owned by: | crschmidt |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.13 Release |
| Component: | Layer.Vector | Version: | 2.8 |
| Keywords: | destroyFeatures | Cc: | pigletto@… |
| State: |
Description
Function layer.destroyFeatures() doesn't call feature.destroy(), although it is supposed to do so. This is because features array is empty after call to this.removeFeatures(features, options) so subsequent calls to features[i].destroy() make no sense. This causes that popups associated with features may become disconnected zombies...
Current implementation of destroyFeatures:
destroyFeatures: function(features, options) {
var all = (features == undefined); // evaluates to true if
// features is null
if(all) {
features = this.features;
}
if(features) {
this.removeFeatures(features, options);
for(var i=features.length-1; i>=0; i--) {
features[i].destroy();
}
}
},
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

