Skip to content

Commit

Permalink
fix: fix max scale size
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Jun 18, 2023
1 parent ea4cd95 commit 9cd9761
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/react-moveable/src/ables/Scalable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export default {
// };

setMinScaleSize([-Infinity, -Infinity]);
setMinScaleSize([Infinity, Infinity]);
setMaxScaleSize([Infinity, Infinity]);
const params = fillParams<OnScaleStart>(moveable, e, {
direction,
set: (scale: number[]) => {
Expand Down Expand Up @@ -377,6 +377,7 @@ export default {
startOffsetWidth * scale[0],
startOffsetHeight * scale[1],
];

scaleSize = calculateBoundSize(
scaleSize,
datas.minScaleSize,
Expand Down

0 comments on commit 9cd9761

Please sign in to comment.