feat: adjust line-confirm-threshold based on zoom (#2884)

Co-authored-by: Lipis <lipiridis@gmail.com>
This commit is contained in:
David Luzar 2021-02-14 14:43:23 +01:00 committed by GitHub
parent ba9b65b051
commit e6cd97c4f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 18 additions and 12 deletions

View file

@ -83,7 +83,7 @@ export const actionFinalize = register({
// If the multi point line closes the loop,
// set the last point to first point.
// This ensures that loop remains closed at different scales.
const isLoop = isPathALoop(multiPointElement.points);
const isLoop = isPathALoop(multiPointElement.points, appState.zoom.value);
if (
multiPointElement.type === "line" ||
multiPointElement.type === "draw"