Prechádzať zdrojové kódy

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

David Luzar 2 rokov pred
rodič
commit
501397cb61
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  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 {