Update actionFinalize.tsx
This commit is contained in:
parent
2eab545f27
commit
f244b76ec0
@ -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];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user