-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Hello,
I'm trying to use this library to make a free-transform controlled component that preserves aspect ratio only when scaled from the corners (tr, tl, br, bl)...
My settings for the scale function look like this:
scale(
scaleType,
{ startX, startY, x, y, scaleX, scaleY, width, height, angle, scaleLimit,
scaleFromCenter: event.altKey,
aspectRatio: true,
enableAspectRatio: preserveAspectRatio,
},
onUpdate
);
preseveAspectRatio is sent true if scaleType is any of the corners
Issue:
Scaling still doesn't preserve aspect ratio except if shift key is pressed
the aspectRatio field seems to have no effect at all on the outcome. Also, after reviewing the source of scale.js I can't seem to understand this:
if(!event.shiftKey && aspectRatio ){
aspectRatio = false
} else if(event.shiftKey && !aspectRatio ){
aspectRatio = true
}
The value of aspectRatio seems to be tied to event.shiftKey which makes it kind of neglected?
Metadata
Metadata
Assignees
Labels
No labels