瀏覽代碼

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 {