Skip to content

Commit 36851b9

Browse files
committed
Fix spacing in EventTarget.js
1 parent 79e9338 commit 36851b9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/util/EventTarget.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function EventTarget(){
1313
* @property _listeners
1414
* @private
1515
*/
16-
this._listeners = {};
16+
this._listeners = {};
1717
}
1818

1919
EventTarget.prototype = {
@@ -35,34 +35,34 @@ EventTarget.prototype = {
3535

3636
this._listeners[type].push(listener);
3737
},
38-
38+
3939
/**
4040
* Fires an event based on the passed-in object.
4141
* @param {Object|String} event An object with at least a 'type' attribute
4242
* or a string indicating the event name.
4343
* @return {void}
4444
* @method fire
45-
*/
45+
*/
4646
fire: function(event){
4747
if (typeof event == "string"){
4848
event = { type: event };
4949
}
5050
if (typeof event.target != "undefined"){
5151
event.target = this;
5252
}
53-
53+
5454
if (typeof event.type == "undefined"){
5555
throw new Error("Event object missing 'type' property.");
5656
}
57-
57+
5858
if (this._listeners[event.type]){
59-
59+
6060
//create a copy of the array and use that so listeners can't chane
6161
var listeners = this._listeners[event.type].concat();
6262
for (var i=0, len=listeners.length; i < len; i++){
6363
listeners[i].call(this, event);
6464
}
65-
}
65+
}
6666
},
6767

6868
/**
@@ -81,8 +81,8 @@ EventTarget.prototype = {
8181
break;
8282
}
8383
}
84-
85-
86-
}
84+
85+
86+
}
8787
}
8888
};

0 commit comments

Comments
 (0)