As far as I can tell, when using a corner control to resize an object, the height and width are changed proportionally maintaining the objects aspect ratio regardless of where the user moves the mouse. My client wants the user to be able to adjust the height and width independently from the aspect ratio when using the corner controls. Is there a setting that will allow that?
Just press the Shift key while scaling.
OR
You can adding this code:
canvas.uniScaleTransform = true;
EDIT:
the property is now called as of Fabric.js 4.0
canvas.uniformScaling = false;
By default, corner controls only resize and maintain aspect ratio.
You can turn off corner controls using setControlsVisibility, like this:
object.setControlsVisibility({
tl: false, //top left
tr: false, //top right
bl: false, //bottom left
br: false //bottom right
});
See this fiddle: http://jsfiddle.net/da7L0n1e/1/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With