Skip to content
This repository was archived by the owner on Sep 20, 2019. It is now read-only.

Commit 78d64f5

Browse files
committed
fix(leafletDirectiveControls extends with attrs.id): changed leafletHelpers.obtainEffectiveMapId to throw when there are mainy mapIds and one is not provided
1 parent b91eabc commit 78d64f5

File tree

9 files changed

+311
-263
lines changed

9 files changed

+311
-263
lines changed

dist/ui-leaflet.js

Lines changed: 70 additions & 66 deletions
Large diffs are not rendered by default.

dist/ui-leaflet.min.no-header.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

dist/ui-leaflet_dev_mapped.js

Lines changed: 70 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/ui-leaflet_dev_mapped.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/services/leafletDirectiveControlsHelpers.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ angular.module('ui-leaflet')
88

99
var _errorHeader = _mainErrorHeader + '[leafletDirectiveControlsHelpers';
1010

11-
var _extend = function(id, thingToAddName, createFn, cleanFn){
11+
var extend = function(id, thingToAddName, createFn, cleanFn){
1212
var _fnHeader = _errorHeader + '.extend] ';
1313
var extender = {};
1414
if(!_isDefined(thingToAddName)){
@@ -31,13 +31,14 @@ angular.module('ui-leaflet')
3131
}
3232

3333
//add external control to create / destroy markers without a watch
34-
leafletData.getDirectiveControls().then(function(controls){
34+
leafletData.getDirectiveControls(id)
35+
.then(function(controls){
3536
angular.extend(controls, extender);
3637
leafletData.setDirectiveControls(controls, id);
3738
});
3839
};
3940

4041
return {
41-
extend: _extend
42+
extend: extend
4243
};
4344
});

0 commit comments

Comments
 (0)