Unique event type value for this target

The goog.events.EventType.CHANGE type is already dispatched because layers are ol.Object instances.  To allow people to register for vector layer specific events without also having listeners get called with more general ol.Object change events, we need to give the types unique values.
This commit is contained in:
Tim Schaub
2013-10-03 08:52:11 -06:00
parent c03e690882
commit 97b56add70

View File

@@ -3,7 +3,6 @@ goog.provide('ol.layer.VectorLayerEventType');
goog.require('goog.array');
goog.require('goog.asserts');
goog.require('goog.events.EventType');
goog.require('goog.object');
goog.require('ol.Feature');
goog.require('ol.extent');
@@ -133,7 +132,7 @@ ol.layer.FeatureCache.prototype.remove = function(feature) {
*/
ol.layer.VectorLayerEventType = {
ADD: 'add',
CHANGE: goog.events.EventType.CHANGE,
CHANGE: 'featurechange',
REMOVE: 'remove',
INTENTCHANGE: 'intentchange'
};