Skip to content

Commit

Permalink
Merge pull request #136 from mapbender/feature/snap-vertices
Browse files Browse the repository at this point in the history
Add vertices snapping for all layers
  • Loading branch information
Phocacius authored Jan 28, 2025
2 parents dc6df21 + 87506d7 commit 96f37f7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -579,12 +579,13 @@
});
},
/**
* extracted to be overridden
* @param {*} schema
* @returns {Array<ol.layer.Vector>}
*/
getSnappingLayers: function(schema) {
return this.getSchemaLayers(schema);
let olMap = this.mbMap.getModel().olMap;
let layers = olMap.getAllLayers().filter(layer => layer instanceof ol.layer.Vector);
return this.getSchemaLayers(schema).concat(layers);
},
/**
* @param {*} schema
Expand Down

0 comments on commit 96f37f7

Please sign in to comment.