Split interaction not snapping to multiple layers
I have several layers and yet the snap functionality for the split interaction is only finding features in the first source in my array of sources (this.sources_).
The check to see if the distance to the object, d, is within range happens outside the sources loop, rather than in it:
https://github.com/Viglino/ol-ext/blob/845aea47b441512caf739fab390755982f73027c/src/interaction/Split.js#L162
So the getClosestFeature method will return false because a feature in the first source is too far away, even if there is a closer feature in the next source. This is because of the break on L159.
A better way to do it may be to find the closest feature for each source and then only return false if no layer has a feature within range, or otherwise snap to the closest of those features.
Happy to elaborate if that's not clear enough.
You're right the break must be removed. All layers have to be checked to get the closests feature....
Fixed in the last commit!
Thanks @Viglino keep up the good work