- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 6685 Articles for Javascript
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
252 Views
As the web storage word represents, it stores the data inside the user’s browser locally. Before HTML 5, developers were using cookies to store data locally, but the cookies allow for storing a limited amount of data, such as in kilobytes. The local storage allows users to store up to 5 MB of data. Developers use the cookies to store the data in the browser and exchange it between the client and server. When we store the data in the cookies, it expires after a particular time. However, we can set the data's expiry, but it still expires after ... Read More
![Shubham Vora](https://www.tutorialspoint.com/assets/profiles/485898/profile/60_1456867-1657516792.jpeg)
1K+ Views
In JavaScript, the scope defines how and in which part of our code we can access the variables and functions. In simple terms, the scope helps us improve our code's security and readability. So, we can access the variables and functions only inside its scope but not outside. We will discuss multiple types of scopes in this tutorial. Global Scope in JavaScript The variables and functions defined globally mean outside all blocks and functions with global scope. We can access all variables and functions with the global scope anywhere inside our code. Syntax Users can follow the syntax below ... Read More
![Rahul Gurung](https://www.tutorialspoint.com/assets/profiles/442556/profile/60_203348-1648528599.jpg)
399 Views
We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity, etc. A FabricJS object is cached on an additional canvas for saving time during re-using the object. In order to switch off object caching for Polygon object we use the objectCaching property. Syntax new fabric.Polygon( points: Array, { objectCaching: Boolean }: Object ) Parameters ... Read More
![Rahul Gurung](https://www.tutorialspoint.com/assets/profiles/442556/profile/60_203348-1648528599.jpg)
153 Views
We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. We can straighten a rotated Polygon object by using the straighten method. The straighten method straightens an object by rotating it from its current angle to 0, 90, 180 or 270 etc., depending on the angle that is closer. Syntax straighten(): fabric.Object Example ... Read More
![Rahul Gurung](https://www.tutorialspoint.com/assets/profiles/442556/profile/60_203348-1648528599.jpg)
184 Views
We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. Serialization is the process of converting an object into a format which is suitable for transfer over a network, which in this case is the object representation. In order to create an Object representation of a Polygon object, we use the toObject method. This method ... Read More
![Rahul Gurung](https://www.tutorialspoint.com/assets/profiles/442556/profile/60_203348-1648528599.jpg)
143 Views
We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. We can return the dataless object representation of a polygon by using the toDatalessObject method. This method returns the object representation of a polygon instance. Syntax toDatalessObject( propertiesToInclude: Array ): Object Parameters propertiesToInclude (optional) − This parameter accepts an Array which allows us to ... Read More
![Rahul Gurung](https://www.tutorialspoint.com/assets/profiles/442556/profile/60_203348-1648528599.jpg)
434 Views
We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. Syntax new fabric.Polygon( points: Array, options: Object ) Parameters points − This parameter accepts an Array which denotes the array of points that make up the polygon object. options (optional)− This parameter is an Object which provides additional customizations to our object. Using ... Read More
![Rahul Gurung](https://www.tutorialspoint.com/assets/profiles/442556/profile/60_203348-1648528599.jpg)
661 Views
We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. Syntax canvas.on("mouse:wheel", callbackFunction); Example 1: Applying zoom Controls on a Polygon Object Let’s see a code example of how we can apply zoom controls on a Polygon object. We can move the mouse wheel to zoom-in or zoom-out. We have added event listener to ... Read More
![Rahul Gurung](https://www.tutorialspoint.com/assets/profiles/442556/profile/60_203348-1648528599.jpg)
204 Views
We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. We use the skewing event to demonstrate how a polygon object reacts to the user while being skewed via controls. Syntax polygon.on("skewing", callbackFunction); Example 1: Displaying how the Object Reacts to the skewing Event Let’s see a code example of how the polygon object ... Read More
![Rahul Gurung](https://www.tutorialspoint.com/assets/profiles/442556/profile/60_203348-1648528599.jpg)
341 Views
We can create a Polygon object by creating an instance of fabric.Polygon. A polygon object can be characterized by any closed shape consisting of a set of connected straight line segments. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. We use the selected and deselected events to demonstrate how to make a polygon object react on user’s selection and deselection of object. Syntax polygon.on("selected", callbackFunction); polygon.on("deselected", callbackFunction); Example 1: Displaying how the Object Reacts to the selected Event Let’s see a code example ... Read More