I have following function to set the marker popup focus to true when user click on the marker.
$scope.$on('leafletDirectiveMarker.click', function (event, args) {
_.map($scope.markers, function (marker, i) {
$scope.markers[i].focus = false;
});
$scope.markers['m' + args.model.value.id].focus = true;
createTemplateForPopup(args.model.value);
});
Now I want to reset the marker popup focus flag to false when the user clicks on the popup close button. Right now when the user clicks on popup close button it won't disable the focus flag.