Skip to content

Commit ced8fcf

Browse files
committed
Workaround to click event issue
1 parent 8f8202f commit ced8fcf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/angular-google-maps.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@
417417

418418
if (angular.isDefined(scope.events)) {
419419
for (var eventName in scope.events) {
420-
if (scope.events.hasOwnProperty(eventName) && angular.isFunction(scope.events[eventName])) {
420+
if (scope.events.hasOwnProperty(eventName) && angular.isFunction(scope.events[eventName]) && eventName != 'click') {
421421
_m.on(eventName, function () {
422422
scope.events[eventName].apply(scope, [_m, eventName, arguments]);
423423
});
@@ -449,6 +449,10 @@
449449
scope.latitude = cm.latitude;
450450
scope.longitude = cm.longitude;
451451
scope.$apply();
452+
453+
if (scope.events.hasOwnProperty('click') && angular.isFunction(scope.events['click'])) {
454+
scope.events['click'].apply(scope, [_m, 'click', arguments]);
455+
}
452456
});
453457
});
454458
}());

0 commit comments

Comments
 (0)