Do not close loop for freedraw
This commit is contained in:
parent
49f15c736b
commit
2b835ebb78
@ -42,7 +42,7 @@ import {
|
|||||||
isBindingEnabled,
|
isBindingEnabled,
|
||||||
} from "./binding";
|
} from "./binding";
|
||||||
import { tupleToCoors } from "../utils";
|
import { tupleToCoors } from "../utils";
|
||||||
import { isBindingElement } from "./typeChecks";
|
import { isBindingElement, isFreeDrawElement } from "./typeChecks";
|
||||||
import { KEYS, shouldRotateWithDiscreteAngle } from "../keys";
|
import { KEYS, shouldRotateWithDiscreteAngle } from "../keys";
|
||||||
import { getBoundTextElement, handleBindTextResize } from "./textElement";
|
import { getBoundTextElement, handleBindTextResize } from "./textElement";
|
||||||
import { DRAGGING_THRESHOLD } from "../constants";
|
import { DRAGGING_THRESHOLD } from "../constants";
|
||||||
@ -344,7 +344,10 @@ export class LinearElementEditor {
|
|||||||
selectedPoint === 0 ||
|
selectedPoint === 0 ||
|
||||||
selectedPoint === element.points.length - 1
|
selectedPoint === element.points.length - 1
|
||||||
) {
|
) {
|
||||||
if (isPathALoop(element.points, appState.zoom.value)) {
|
if (
|
||||||
|
!isFreeDrawElement(element) &&
|
||||||
|
isPathALoop(element.points, appState.zoom.value)
|
||||||
|
) {
|
||||||
LinearElementEditor.movePoints(element, [
|
LinearElementEditor.movePoints(element, [
|
||||||
{
|
{
|
||||||
index: selectedPoint,
|
index: selectedPoint,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user