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:
Tim Schaub
2013-12-11 16:19:59 -07:00
parent c8985b9906
commit 625007f364
6 changed files with 17 additions and 16 deletions

View File

@@ -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));
};