Javascript Articles

Page 199 of 534

How to lock the vertical skewing of Rectangle using FabricJS?

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

In this tutorial, we are going to learn how to lock the vertical skewing 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 to stop skewing an object vertically. This can be done by using the lockSkewingY property. Syntax new fabric.Rect({ lockSkewingY : Boolean }: Object) Parameters Options (optional) − This parameter is an Object which provides additional customizations to our rectangle. Using this parameter, properties such as colour, cursor, stroke ...

Read More

How to lock the vertical scaling of Triangle using FabricJS?

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

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

Read More

How to maintain stroke width of a Rectangle while scaling using FabricJS?

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

In this tutorial, we are going to learn how we can maintain the stroke width of Rectangle while scaling using FabricJS. By default, the stroke width increases or decreases with respect to the object's scale values. However, we can disable this behaviour by using the strokeUniform property. Syntax new fabric.Rect({ strokeUniform: Boolean }: Object) Parameters Options (optional) − This parameter is an Object which provides additional customizations to our rectangle. Using this parameter, properties such as colour, cursor, stroke width, and a lot of other properties can be changed related to the object ...

Read More

How to lock the vertical skewing of a Triangle using FabricJS?

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

In this tutorial, we are going to learn how to lock the vertical skewing of a Triangle using FabricJS. Just as we can specify the position, colour, opacity and dimension of a triangle object in the canvas, we can also specify whether we want to stop skewing an object vertically. This can be done by using the lockSkewingY property. Syntax new fabric.Triangle({ lockSkewingY : Boolean }: Object) Parameters Options (optional) − This parameter is an Object which provides additional customizations ...

Read More

How to maintain stroke width of a Triangle while scaling using FabricJS?

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

In this tutorial, we are going to learn how we can maintain the stroke width of Triangle while scaling using FabricJS. By default, the stroke width increases or decreases with respect to the object's scale values. However, we can disable this behaviour by using the strokeUniform property. Syntax new fabric.Triangle({ strokeUniform: Boolean }: Object) Parameters Options (optional) − This parameter is an Object which provides additional customizations to our triangle. Using this parameter, properties such as colour, cursor, stroke width, and a lot ...

Read More

How to make a Rectangle invisible using FabricJS?

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

In this tutorial, we are going to learn how to make a Rectangle invisible 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. Our rectangle 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.Rect({ visible: Boolean }: Object) Parameters ...

Read More

How to make a Triangle invisible using FabricJS?

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

In this tutorial, we are going to learn how to make a Triangle invisible 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 by making it visible or invisible. We can do this by using the visible property. Syntax new fabric.Triangle({ visible: Boolean }: Object) Parameters ...

Read More

How to make the controlling corners of a Triangle transparent using FabricJS?

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

In this tutorial, we are going to learn how to make the controlling corners of Triangle transparent 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. The transparentCorners property allows us to make the controlling corners of Triangle transparent. Syntax new fabric.Triangle( { transparentCorners: Boolean }: Object) Parameters Options (optional) − This parameter is an Object which provides ...

Read More

How to make the controlling corners of a Rectangle transparent using FabricJS?

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

In this tutorial, we are going to learn how to make the controlling corners of Rectangle transparent 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. The transparentCorners property allows us to make the controlling corners of Rectangle transparent. Syntax new fabric.Rect({ transparentCorners: Boolean }: Object) Parameters Options (optional) − This parameter is an Object which provides additional ...

Read More

How to set the angle of rotation of a Triangle using FabricJS?

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

In this tutorial, we are going to set the angle of rotation of 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. The angle property in FabricJS defines the angle of 2D rotation of an object. We also have the centeredRotation property that allows us to use the center point of a triangle as the origin of transformation. Syntax new fabric.Triangle({ angle: Number, ...

Read More
Showing 1981–1990 of 5,340 articles
« Prev 1 197 198 199 200 201 534 Next »
Advertisements