Is it possible to export scaleObjectFromCorner, scaleObjectX and scaleObjectY from controlsUtils? #9919
Replies: 2 comments
-
Build additional wrapper is the way i would suggest. |
Beta Was this translation helpful? Give feedback.
-
@asturur I need to keep all default control behavior for Because the If there is easier way, it will very helpful. |
Beta Was this translation helpful? Give feedback.
-
I have a requirement that set minimal size of Rectangle, that means if the size reach to minimal, it can't scaling continue.
What in my mind is after the control actionHandler executed and reach to minimal size, I will set back the last scaleX, scaleY.
But current control actionHandler is wrapped, I need to wrap again if I set scaleX, scaleY back - wrapWithFixedAnchor, wrapWithFireEvent.
So if I can extend scaleObjectFromCorner, then I can simply replace
export const scalingEqually = wrapWithFireEvent( 'scaling', wrapWithFixedAnchor(scaleObjectFromCorner) );
Or is there convenient way to implement the minimal size?
Thanks so much.
Beta Was this translation helpful? Give feedback.
All reactions