Rahul Gurung

Rahul Gurung

490 Articles Published

Articles by Rahul Gurung

Page 12 of 49

How to lock the vertical movement of Textbox using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 286 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 ...

Read More

How to add underline in IText using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 393 Views

In this tutorial, we are going to learn how to add underline to IText using FabricJS. The IText class was introduced in FabricJS version 1.4, extends fabric.Text and is used to create IText instances. An IText instance gives us the freedom to select, cut, paste or add new text without additional configurations. There are also various supported key combinations and mouse/touch combinations which make text interactive which are not provided in Text. Textbox, however, which is based on IText allows us to resize the text rectangle and wraps lines automatically. This is not true for IText as height is ...

Read More

How to disable the centered scaling of Circle using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 294 Views

In this tutorial, we are going to learn how to disable the centered scaling of Circle using FabricJS. Circle is one of the various shapes provided by FabricJS. In order to create a circle, we will have to create an instance of fabric.Circle class and add it to the canvas. When being scaled via controls, assigning a true value to the centeredScaling property, uses the center as the object's origin of transformation. Syntax new fabric.Circle({ centeredScaling: Boolean }: Object) Parameters options (optional) − ...

Read More

How to add shadow to a Triangle using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 167 Views

In this tutorial, we are going to learn how to add a shadow to a Triangle using FabricJS. Triangle is one of the various shapes provided by FabricJS. In order to create a triangle, we will have to create an instance of fabric.Triangle class and add it to the canvas. Our triangle object can be customized in various ways like changing its dimensions, adding a background color or even adding a shadow to it. We can add a shadow to the triangle by using the shadow property. Syntax new fabric.Triangle({ shadow : fabric.Shadow }: Object) ...

Read More

How to lock the vertical scaling of Textbox using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 275 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 ...

Read More

How to center an object vertically with respect to current viewport of canvas in IText using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 333 Views

In this tutorial, we are going to learn about how to center an object vertically with respect to current viewport of canvas in IText using FabricJS. The IText class was introduced in FabricJS version 1.4, extends fabric.Text and is used to create IText instances. An IText instance gives us the freedom to select, cut, paste or add new text without additional configurations. There are also various supported key combinations and mouse/touch combinations which make text interactive which are not provided in Text. Textbox, however, which is based on IText allows us to resize the text rectangle and wraps lines ...

Read More

How to set the angle of skew on Y-axis of Ellipse using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 276 Views

In this tutorial, we are going to learn how to set the angle of skew on Y-axis of an Ellipse using FabricJS. Ellipse is one of the various shapes provided by FabricJS. In order to create an ellipse, we will have to create an instance of fabric.Ellipse class and add it to the canvas. Our ellipse object can be customized in various ways like changing its dimensions, adding a background color or by changing the angle of skew on Y-axis. We can do this by using the skewY property. Syntax new fabric.Ellipse({ skewY : Number }: Object) ...

Read More

How to make a Textbox invisible using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 431 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: ...

Read More

How to change the alignment of text to path in IText using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 611 Views

In this tutorial, we are going to learn about how to change the alignment of text to path in IText using FabricJS. The IText class was introduced in FabricJS version 1.4, extends fabric.Text and is used to create IText instances. An IText instance gives us the freedom to select, cut, paste or add new text without additional configurations. There are also various supported key combinations and mouse/touch combinations which make text interactive which are not provided in Text. Textbox, however, which is based on IText allows us to resize the text rectangle and wraps lines automatically. This is not ...

Read More

How to set the background color of selection of Ellipse using FabricJS?

Rahul Gurung
Rahul Gurung
Updated on 15-Mar-2026 315 Views

In this tutorial, we are going to learn how to set the background color of selection of an Ellipse using FabricJS. Ellipse is one of the various shapes provided by FabricJS. In order to create an ellipse, we have to create an instance of fabric.Ellipse class and add it to the canvas. We can change an objects dimensions, rotate it or manipulate it when it is actively selected. We can change the background color of selection of Ellipse by using the selectionBackgroundColor property. Syntax new fabric.Ellipse({ selectionBackgroundColor : String }: Object) Parameters ...

Read More
Showing 111–120 of 490 articles
« Prev 1 10 11 12 13 14 49 Next »
Advertisements