Make enum property name like its value
Where an enum value is used as an event type, it should be alllowercase (to follow DOM events). Property names should be ALLUPPERCASE in this case (just as camelCase and PascalCase are converted to CONSTANT_CASE).
This commit is contained in:
@@ -22,7 +22,7 @@ goog.require('ol.Observable');
|
||||
*/
|
||||
ol.ObjectEventType = {
|
||||
BEFORECHANGE: 'beforechange',
|
||||
CHANGE: 'propertychange'
|
||||
PROPERTYCHANGE: 'propertychange'
|
||||
};
|
||||
|
||||
|
||||
@@ -396,7 +396,8 @@ ol.Object.prototype.notify = function(key) {
|
||||
ol.Object.prototype.notifyInternal_ = function(key) {
|
||||
var eventType = ol.Object.getChangeEventType(key);
|
||||
this.dispatchEvent(eventType);
|
||||
this.dispatchEvent(new ol.ObjectEvent(ol.ObjectEventType.CHANGE, key));
|
||||
this.dispatchEvent(
|
||||
new ol.ObjectEvent(ol.ObjectEventType.PROPERTYCHANGE, key));
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user