Update actionFinalize.tsx

This commit is contained in:
zsviczian 2024-01-06 18:11:26 +01:00 committed by GitHub
parent 2eab545f27
commit f244b76ec0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 4 deletions

View File

@ -100,10 +100,7 @@ export const actionFinalize = register({
// set the last point to first point.
// This ensures that loop remains closed at different scales.
const isLoop = isPathALoop(multiPointElement.points, appState.zoom.value);
if (
multiPointElement.type === "line" ||
multiPointElement.type === "freedraw"
) {
if (multiPointElement.type === "line") {
if (isLoop) {
const linePoints = multiPointElement.points;
const firstPoint = linePoints[0];