Events fixes
This commit is contained in:
parent
0eb9cd8cc6
commit
36f7ada676
@ -1,3 +1,7 @@
|
||||
/*
|
||||
* L.Mixin.Events adds custom events functionality to Leaflet classes
|
||||
*/
|
||||
|
||||
L.Mixin = {};
|
||||
|
||||
L.Mixin.Events = {
|
||||
@ -31,9 +35,10 @@ L.Mixin.Events = {
|
||||
fireEvent: function(/*String*/ type, /*(optional) Object*/ data) {
|
||||
if (!this.hasEventListeners(type)) { return; }
|
||||
|
||||
var event = data || {};
|
||||
event.type = type;
|
||||
event.target = this;
|
||||
var event = L.Util.extend({
|
||||
type: type,
|
||||
target: this
|
||||
}, data);
|
||||
|
||||
var listeners = this._events[type].slice();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user