This commit is contained in:
zsviczian 2025-04-22 15:15:19 +00:00 committed by GitHub
commit 97bb6723ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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