terra-draw
terra-draw copied to clipboard
[Feature Request] Allow snapping for LineStrings and Polygon features in select mode
maybe this is possible in the current version
Hey, thanks for the question. Can you clarify what you mean here exactly? If you mean snapping LineStrings and Polygons in Select mode then that is not currently supported.
yes, you understood correctly, it is a pity that there is no such feature
@bochkov-vi we are now able to snap for polygons created in TerraDrawPolygonMode and linestrings created in TerraDrawLineString mode, when using TerraDrawSelectMode. You can configure the snappable flag for select mode like so:
new TerraDrawSelectMode({
projection: "web-mercator",
flags: {
polygon: {
feature: {
coordinates: {
snappable: {
toLine: true,
toCoordinate: true
},
}
}
},
linestring: {
feature: {
coordinates: {
snappable: {
toLine: true,
toCoordinate: true
},
}
}
}
}
})
It is now available as part of version 1.8.0