|
1 | 1 | /*!
|
2 |
| -* ui-leaflet 2.0.0 2016-10-05 |
| 2 | +* ui-leaflet 2.0.0 2017-08-15 |
3 | 3 | * ui-leaflet - An AngularJS directive to easily interact with Leaflet maps
|
4 | 4 | * git: https://github.com/angular-ui/ui-leaflet
|
5 | 5 | */
|
@@ -134,7 +134,7 @@ angular.module('ui-leaflet', ['nemLogging']).directive('leaflet', ["$q", "leafle
|
134 | 134 | });
|
135 | 135 |
|
136 | 136 | scope.$on('$destroy', function () {
|
137 |
| - leafletMapDefaults.reset(); |
| 137 | + leafletMapDefaults.reset(attrs.id); |
138 | 138 | map.remove();
|
139 | 139 | leafletData.unresolveMap(attrs.id);
|
140 | 140 | });
|
@@ -1867,8 +1867,11 @@ angular.module('ui-leaflet').factory('leafletMapDefaults', ["$q", "leafletHelper
|
1867 | 1867 |
|
1868 | 1868 | // Get the _defaults dictionary, and override the properties defined by the user
|
1869 | 1869 | return {
|
1870 |
| - reset: function reset() { |
1871 |
| - defaults = {}; |
| 1870 | + reset: function reset(scopeId) { |
| 1871 | + if (!isDefined(scopeId)) { |
| 1872 | + scopeId = 'main'; |
| 1873 | + } |
| 1874 | + delete defaults[scopeId]; |
1872 | 1875 | },
|
1873 | 1876 | getDefaults: function getDefaults(scopeId) {
|
1874 | 1877 | var mapId = obtainEffectiveMapId(defaults, scopeId);
|
@@ -4798,7 +4801,12 @@ angular.module('ui-leaflet').factory('leafletEventsHelpersFactory', ["$rootScope
|
4798 | 4801 | // Event propadation logic
|
4799 | 4802 | if (isDefined(leafletScope.eventBroadcast[this.lObjectType].logic)) {
|
4800 | 4803 | // We take care of possible propagation logic
|
4801 |
| - if (leafletScope.eventBroadcast[_this.lObjectType].logic !== "emit" && leafletScope.eventBroadcast[_this.lObjectType].logic !== "broadcast") $log.warn(errorHeader + "Available event propagation logic are: 'emit' or 'broadcast'."); |
| 4804 | + var configuredLogic = leafletScope.eventBroadcast[_this.lObjectType].logic; |
| 4805 | + if (configuredLogic !== "emit" && configuredLogic !== "broadcast") { |
| 4806 | + $log.warn(errorHeader + "Available event propagation logic are: 'emit' or 'broadcast'."); |
| 4807 | + } else { |
| 4808 | + logic = configuredLogic; |
| 4809 | + } |
4802 | 4810 | }
|
4803 | 4811 | // Enable / Disable
|
4804 | 4812 | var eventsEnable = false,
|
@@ -5050,7 +5058,7 @@ angular.module('ui-leaflet').factory('leafletMarkerEvents', ["$rootScope", "$q",
|
5050 | 5058 |
|
5051 | 5059 | 'use strict';
|
5052 | 5060 |
|
5053 |
| -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; |
| 5061 | +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; |
5054 | 5062 |
|
5055 | 5063 | angular.module('ui-leaflet').factory('leafletPathEvents', ["$rootScope", "$q", "leafletLogger", "leafletHelpers", "leafletLabelEvents", "leafletEventsHelpers", function ($rootScope, $q, leafletLogger, leafletHelpers, leafletLabelEvents, leafletEventsHelpers) {
|
5056 | 5064 | var isDefined = leafletHelpers.isDefined,
|
|
0 commit comments