Rahul Gurung

Rahul Gurung

490 Articles Published

Articles by Rahul Gurung

Page 10 of 49

How to create a Circle with progress cursor on hover over objects using FabricJS?

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

In this tutorial, we are going to create a Circle with a progress cursor on hover over objects using FabricJS. progress is one of the native cursor styles available which can be used in the FabricJS canvas too. FabricJS provides various types of cursors like default, all-scroll, crosshair, col-resize, row-resize etc. which are reusing the native cursor underhood. The hoverCursor property sets the style of the cursor when hovered over a canvas object. Syntax new fabric.Circle({ hoverCursor: String }: Object) Parameters options (optional) ...

Read More

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

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

Read More

How to add linethrough to IText using FabricJS?

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

In this tutorial, we are going to learn about how to add linethrough to IText object 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 ...

Read More

How to create a Circle with text cursor on hover over objects using FabricJS?

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

In this tutorial, we are going to create a Circle with a text cursor on hover over objects using FabricJS. The text cursor is one of the native cursor styles available which can be used in the FabricJS canvas. FabricJS provides various types of cursors like default, all-scroll, crosshair, col-resize, row-resize etc. which reuse the native cursor underneath. The hoverCursor property sets the style of the cursor when hovered over a canvas object. Syntax new fabric.Circle({ hoverCursor: String }: Object) Parameters options (optional) ...

Read More

How to create a Rectangle with dash pattern border using FabricJS?

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

In this tutorial, we are going to create a rectangle with a dash pattern border using FabricJS. Rectangle is one of the various shapes provided by FabricJS. In order to create a rectangle, we will have to create an instance of fabric.Rect class and add it to the canvas. We can change the appearance of the dashes of border by using the borderDashArray property. However, our rectangle object must have borders in order for this property to work. If the hasBorders property is assigned a False value, this property will not work. Syntax new fabric.Rect({ borderDashArray: ...

Read More

How to lock the horizontal movement of Textbox using FabricJS?

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

Read More

How to enable retina scaling for cloned image using FabricJS?

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

In this tutorial, we are going to learn how to enable retina scaling for a cloned image using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to enable retina scaling for a cloned image, we use the enableRetinaScaling property. In this case, the clone image is scaled up by the devicePixelRatio for better rendering on retina screens. There will be no change on the appearance of the image. Syntax ...

Read More

How to create a Circle with wait cursor on hover over objects using FabricJS?

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

In this tutorial, we are going to create a Circle with a wait cursor on hover over objects using FabricJS. wait is one of the native cursor styles available which can be used in the FabricJS canvas too. FabricJS provides various types of cursors like default, all-scroll, crosshair, col-resize, row-resize, etc., which are reusing the native cursor underhood. The hoverCursor property sets the style of the cursor when hovered over a canvas object. Syntax new fabric.Circle({ hoverCursor: String }: Object) Parameters options (optional) ...

Read More

How to lock the vertical movement of a Rectangle using FabricJS?

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

In this tutorial, we are going to learn how to lock the vertical movement of a Rectangle using FabricJS. Just as we can specify the position, colour, opacity and dimension of a rectangle 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.Rect({ lockMovementY: Boolean }: Object) Parameters options (optional) − This parameter is an Object which provides additional customizations to our rectangle. ...

Read More

How to lock the horizontal scaling of Textbox using FabricJS?

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

Read More
Showing 91–100 of 490 articles
« Prev 1 8 9 10 11 12 49 Next »
Advertisements