Handles snapping of vector features while modifying or drawing them. The
features can come from a module:ol/source/Vector~VectorSource or module:ol/Collection~Collection
Any interaction object that allows the user to interact
with the features using the mouse can benefit from the snapping, as long
as it is added before.
The snap interaction modifies map browser event coordinate and pixel
properties to force the snap to occur to any interaction that them.
Example:
import Snap from 'ol/interaction/Snap';
var snap = new Snap({
source: source
});