Skip to content

Commit fe1e2eb

Browse files
committed
🐛 fix freeform resizing for side handles with constraints.
1 parent 68aa576 commit fe1e2eb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/box_transform/lib/src/transformer.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -374,8 +374,12 @@ class BoxTransformer {
374374
newRect = Box.fromHandle(
375375
handle.anchor(initialRect),
376376
handle,
377-
constraints.minWidth,
378-
constraints.minHeight,
377+
!handle.isSide || handle.isHorizontal
378+
? constraints.minWidth
379+
: constrainedWidth,
380+
!handle.isSide || handle.isVertical
381+
? constraints.minHeight
382+
: constrainedHeight,
379383
);
380384
}
381385
}

0 commit comments

Comments
 (0)