Found 6710 Articles for Javascript

How to make a Textbox invisible using FabricJS?

Rahul Gurung
Updated on 02-Aug-2022 12:19:55

374 Views

In this tutorial, we are going to learn how to make a Textbox invisible using FabricJS. Textbox is one of the various shapes provided by FabricJS. We can customize, stretch or move around the text written in a textbox. In order to create a textbox, we will have to create an instance of fabric.Textbox class and add it to the canvas. Our textbox object can be customized in various ways like changing its dimensions, adding a background color or by making it visible or invisible. We can do this by using the visible property. Syntax new fabric.Textbox(text: String, { visible: ... Read More

How to lock the vertical scaling of Textbox using FabricJS?

Rahul Gurung
Updated on 02-Aug-2022 12:17:14

227 Views

In this tutorial, we are going to learn how to lock the vertical scaling of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want to stop scaling an object vertically. This can be done by using the lockScalingY property. Syntax new fabric.Textbox(text: String, { lockScalingY : Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our textbox. options (optional) − This parameter is an Object ... Read More

How to lock the vertical movement of Textbox using FabricJS?

Rahul Gurung
Updated on 02-Aug-2022 12:14:00

236 Views

In this tutorial, we are going to learn how to lock the vertical movement of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want it to move only in the X-axis. This can be done by using the lockMovementY property. Syntax new fabric.Textbox(text: String, { lockMovementY: Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our textbox. options (optional) − This parameter is an Object ... Read More

How to lock the rotation of Textbox using FabricJS?

Rahul Gurung
Updated on 02-Aug-2022 12:11:41

246 Views

In this tutorial, we are going to learn how to lock the rotation of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want to allow rotation or not. This can be done by using the lockRotation property. Syntax new fabric.Textbox(text: String, { lockRotation : Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our textbox. options (optional) − This parameter is an Object which provides ... Read More

How to lock the horizontal skewing of Textbox using FabricJS?

Rahul Gurung
Updated on 02-Aug-2022 12:09:09

212 Views

In this tutorial, we are going to learn how to lock the horizontal skewing of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want to stop skewing an object horizontally. This can be done by using the lockSkewingX property. Syntax new fabric.Textbox(text: String, { lockSkewingX : Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our textbox. options (optional) − This parameter is an Object ... Read More

How to lock the horizontal scaling of Textbox using FabricJS?

Rahul Gurung
Updated on 02-Aug-2022 12:06:20

410 Views

In this tutorial, we are going to learn how to lock the horizontal scaling of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want to stop scaling an object horizontally. This can be done by using the lockScalingX property. Syntax new fabric.Textbox(text: String, { lockScalingX : Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our textbox. options (optional) − This parameter is an Object ... Read More

How to lock the horizontal movement of Textbox using FabricJS?

Rahul Gurung
Updated on 02-Aug-2022 12:01:55

147 Views

In this tutorial, we are going to learn how to lock the horizontal movement of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want it to move only in the Y-axis. This can be done by using the lockMovementX property. Syntax new fabric.Textbox(text: String, { lockMovementX: Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our textbox. options (optional) − This parameter is an Object ... Read More

How to lock the flipping during scaling of Textbox using FabricJS?

Rahul Gurung
Updated on 12-Sep-2022 12:55:15

217 Views

In this tutorial, we are going to learn how to lock the flipping during scaling of a Textbox using FabricJS. Just as we can specify the position, colour, opacity and dimension of a textbox object in the canvas, we can also specify whether we want to stop flipping an object during scaling. This can be done by using the lockScalingFlip property. Syntax new fabric.Textbox(text: String, { lockScalingFlip : Boolean }: Object) Parameters text − This parameter accepts a String which is the text string that we want to display inside our textbox. options (optional) − This parameter is ... Read More

How to change string to be displayed as a superscript using JavaScript?

Shubham Vora
Updated on 02-Aug-2022 11:40:17

3K+ Views

In this tutorial, we are going to learn to change strings to be displayed as a superscript using JavaScript. As the name suggests, the superscript string is displayed at the half-height of the normal string. Also, characters of the superscript string are smaller than the normal string characters.There are a lot of uses of the superscript string while writing the mathematical formulas. For example, A2, B2, 105, etc. Also, we can use the superscript to show the chemical formulas such as O22-, H-, etc.Here, using HTML or JavaScript, users can learn to display string as a superscript.Display string as subscript ... Read More

How to flip a Textbox vertically using FabricJS?

Rahul Gurung
Updated on 29-Jul-2022 13:55:24

219 Views

In this tutorial, we are going to learn how we can flip a Textbox object vertically using FabricJS. We can customize, stretch or move around the text written in a textbox. In order to create a textbox, we will have to create an instance of fabric.Textbox class and add it to the canvas. We can flip a textbox object vertically using the flipY property.Syntaxnew fabric.Textbox(text: String, { flipY: Boolean }: Object)Parameterstext − This parameter accepts a String which is the text string that we want to display inside our textbox.options (optional) − This parameter is an Object which provides additional ... Read More

Advertisements