mirror of
https://github.com/excalidraw/excalidraw.git
synced 2024-04-21 12:42:26 +00:00
do not resize for linear elements with only two points
This commit is contained in:
@@ -23,6 +23,7 @@ import {
|
||||
pointRotate,
|
||||
} from "../../utils/geometry/geometry";
|
||||
import { Line, Point } from "../../utils/geometry/shape";
|
||||
import { isLinearElement } from "./typeChecks";
|
||||
|
||||
const SIDE_RESIZING_SPACING = DEFAULT_TRANSFORM_HANDLE_SPACING * 4.5;
|
||||
|
||||
@@ -83,6 +84,7 @@ export const resizeTest = (
|
||||
|
||||
if (
|
||||
element.type !== "text" &&
|
||||
!(isLinearElement(element) && element.points.length <= 2) &&
|
||||
showAllTransformHandles(Math.abs(x2 - x1), Math.abs(y2 - y1), zoom)
|
||||
) {
|
||||
const SPACING = SIDE_RESIZING_SPACING / zoom.value;
|
||||
|
||||
Reference in New Issue
Block a user