소스 검색

fix: disable locking aspect ratio for box-selection (#5525)

David Luzar 2 년 전
부모
커밋
501397cb61
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/element/dragElements.ts

+ 1 - 1
src/element/dragElements.ts

@@ -105,7 +105,7 @@ export const dragNewElement = (
       true */
   widthAspectRatio?: number | null,
 ) => {
-  if (shouldMaintainAspectRatio) {
+  if (shouldMaintainAspectRatio && draggingElement.type !== "selection") {
     if (widthAspectRatio) {
       height = width / widthAspectRatio;
     } else {