Skip to content

Commit 0fdf006

Browse files
authored
Merge pull request #38 from xmojmr/master
Fix for issue #37
2 parents b433a97 + b50adb6 commit 0fdf006

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/js/L.PM.LayerGroup.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ L.PM.Edit.LayerGroup = L.Class.extend({
33
initialize: function(layerGroup) {
44
var self = this;
55
this._layerGroup = layerGroup;
6-
this._layers = layerGroup.getLayers();
6+
this._layers = [];
7+
8+
var layers = layerGroup.getLayers();
9+
for(var i=0; i<layers.length; i++) {
10+
if (layers[i].pm)
11+
this._layers.push(layers[i]);
12+
}
713

814
// listen to the edit event of the layers in this group
915
for(var i=0; i<this._layers.length; i++) {

0 commit comments

Comments
 (0)