How to lock scaling flip of a text canvas using Fabric.js ?
In this article, we are going to see how to lock the scaling flip of a text canvas using FabricJS. The canvas means text written is movable, rotatable, resizable and can be stretched. Further, normally it can be scaled into the negative side to flip the text but we will lock scaling flip so that it cannot be flipped. Further, the text itself cannot be edited like a textbox.
fabric.Text(text, lockScalingFlip: boolean);
Parameters: This function accept two parameters as mentioned above and described below:
- text: It specifies the text to be written.
- lockScalingFlip: It specifies whether to enable or disable the scaling flip lock, disabled by default.
Example: We can use FabricJS to lock scaling flip of a canvas-like text as given below.