Support negative resize for multiple points line/arrow (#1237)
* Support negative resize for multiple points line * prettier * Fix an issue with width or height becoming zero
This commit is contained in:
@ -10,7 +10,6 @@ import {
|
||||
handlerRectangles,
|
||||
} from "./handlerRectangles";
|
||||
import { AppState } from "../types";
|
||||
import { isLinearElement } from "./typeChecks";
|
||||
|
||||
type HandlerRectanglesRet = keyof ReturnType<typeof handlerRectangles>;
|
||||
|
||||
@ -155,7 +154,7 @@ export function normalizeResizeHandle(
|
||||
element: ExcalidrawElement,
|
||||
resizeHandle: HandlerRectanglesRet,
|
||||
): HandlerRectanglesRet {
|
||||
if ((element.width >= 0 && element.height >= 0) || isLinearElement(element)) {
|
||||
if (element.width >= 0 && element.height >= 0) {
|
||||
return resizeHandle;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user