Compare commits

...

3 Commits

Author SHA1 Message Date
zsviczian
f244b76ec0
Update actionFinalize.tsx 2024-01-06 18:11:26 +01:00
zsviczian
2eab545f27
Update linearElementEditor.ts 2024-01-06 18:10:18 +01:00
zsviczian
2b835ebb78
Do not close loop for freedraw 2024-01-03 16:08:22 +01:00

View File

@ -100,10 +100,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];