Found 566 Articles for FabricJS

How to lock the horizontal skewing of Triangle using FabricJS?

Rahul Gurung
Updated on 24-Jun-2022 14:34:22

68 Views

In this tutorial, we are going to learn how to lock the horizontal 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 horizontally. This can be done by using the lockSkewingX property.Syntaxnew fabric.Triangle({ lockSkewingX : Boolean }: Object)ParametersOptions (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 of other properties can be changed related to the ... Read More

How to lock the horizontal scaling of Triangle using FabricJS?

Rahul Gurung
Updated on 24-Jun-2022 14:31:18

66 Views

In this tutorial, we are going to learn how to lock the horizontal 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 horizontally. This can be done by using the lockScalingX property.Syntaxnew fabric.Triangle({ lockScalingX : Boolean }: Object)ParametersOptions (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 of other properties can be changed related to the ... Read More

How to lock the horizontal movement of a Triangle using FabricJS?

Rahul Gurung
Updated on 24-Jun-2022 14:29:09

60 Views

In this tutorial, we are going to learn how to lock the horizontal movement 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 it to move only in the Y-axis. This can be done by using the lockMovementX property.Syntaxnew fabric.Triangle({ lockMovementX: Boolean }: Object)ParametersOptions (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 of other properties can be changed related to the ... Read More

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

Rahul Gurung
Updated on 24-Jun-2022 14:26:52

67 Views

In this tutorial, we are going to learn how to lock the flipping during 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 flipping an object during scaling. This can be done by using the lockScalingFlip property.Syntaxnew fabric.Triangle({ lockScalingFlip : Boolean }: Object)ParametersOptions (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 of other properties can be changed related ... Read More

How to hide the controlling corners of a Triangle using FabricJS?

Rahul Gurung
Updated on 24-Jun-2022 14:24:56

83 Views

In this tutorial, we are going to learn how to hide the controlling corners 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 controlling corners of an object allow us to increase or decrease its scale, stretch or change its position. We can customize our controlling corners in many ways such as adding a specific colour to it, changing its size, etc. We can also hide them using the hasControls property.Syntaxnew fabric.Triangle({ ... Read More

How to hide the controlling borders of a Triangle using FabricJS?

Rahul Gurung
Updated on 24-Jun-2022 14:22:29

59 Views

In this tutorial, we are going to learn how to hide the controlling borders 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.We can customize our controlling borders in many ways such as adding a specific colour to it, a dash pattern, etc. We can also eliminate the borders completely by using the hasBorders property.Syntaxnew fabric.Triangle({ hasBorders: Boolean }: Object)ParametersOptions (optional) − This parameter is an Object which provides additional customizations to our Triangle. ... Read More

How to flip a Triangle vertically using FabricJS?

Rahul Gurung
Updated on 24-Jun-2022 14:20:32

111 Views

In this tutorial, we are going to learn how we can flip a Triangle object vertically 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. We can flip a triangle object vertically using the flipY property.Syntaxnew fabric.Triangle({ flipY: Boolean }: Object)ParametersOptions (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 of other properties can be changed related to the ... Read More

How to flip a Triangle horizontally using FabricJS?

Rahul Gurung
Updated on 24-Jun-2022 14:18:15

109 Views

In this tutorial, we are going to learn how we can flip a Triangle object horizontally 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. We can flip a triangle object horizontally using the flipX property.Syntaxnew fabric.Triangle({ flipX: Boolean }: Object)ParametersOptions (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 of other properties can be changed related to ... Read More

How to disable the selectability of Triangle using FabricJS?

Rahul Gurung
Updated on 24-Jun-2022 14:15:17

67 Views

In this tutorial, we are going to learn how to disable selectability 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.In order to modify an object, we have to select it in FabricJS. However, we can disable this behaviour by using the selectable property.Syntaxnew fabric.Triangle{ selectable: Boolean }: Object)ParametersOptions (optional) − This parameter is an Object which provides additional customizations to our triangle. Using this parameter, properties such as colour, cursor, stroke width, ... Read More

How to disable the centered scaling of a Triangle using FabricJS?

Rahul Gurung
Updated on 24-Jun-2022 14:13:17

70 Views

In this tutorial, we are going to learn how to disable the centered scaling of 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.When an object is scaled via controls, assigning a True value to the centeredScaling property, the origin of transformation is its center.Syntaxnew fabric.Triangle({ centeredScaling: Boolean }: Object)ParametersOptions (optional) − This parameter is an Object which provides additional customizations to our triangle. Using this parameter, properties such as colour, cursor, stroke width, and ... Read More

Advertisements