OpenLayers OpenLayers

Changeset 7488

Show
Ignore:
Timestamp:
07/11/08 10:47:53 (2 months ago)
Author:
elemoine
Message:

tiles must remove their reference to feature being removed

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/vector-behavior/lib/OpenLayers/Strategy/Grid.js

    r7484 r7488  
    6969            this.features = []; 
    7070            OpenLayers.Util.extend(this, options); 
     71            this.strategy.layer.events.on({ 
     72                'beforefeatureremoved': this.beforefeatureremoved, 
     73                scope: this 
     74            }); 
    7175        }, 
    7276 
     
    7478         */ 
    7579        destroy: function() { 
     80            this.strategy.layer.events.un({ 
     81                'beforefeatureremoved': this.beforefeatureremoved, 
     82                scope: this 
     83            }); 
    7684            this.destroyFeatures(); 
    7785            this.bounds = null; 
     
    7987            this.strategy = null; 
    8088            this.features = null; 
     89        }, 
     90 
     91        /** 
     92         */ 
     93        beforefeatureremoved: function(obj) { 
     94            var feature = obj.feature; 
     95            OpenLayers.Util.removeItem(this.features, feature); 
    8196        }, 
    8297