In this article, we are going to see how to remove only the rotation controls of a canvas-like text using FabricJS. The canvas means text written is movable and can be stretched according to requirement but we will remove the rotation controls so that it cannot be rotated but only be moved and resized. Further, the text itself cannot be edited like a textbox.
fabric.Text(text, hasRotatingPoint: boolean);
Parameters: This function accepts two parameters as mentioned above and described below:
- text: It specifies the text to be written.
- hasRotatingPoint: It specifies whether to enable or disable the rotation controls, enabled by default.
Program: We can use FabricJS to remove only the rotation controls of canvas-like text as given below. Note that you have to click on the text to see if its controls are there or not.
- How to remove controls of a text canvas using Fabric.js ?
- How to enable/disable all input controls inside a form element using jQuery ?
- Mouse swipe controls in Angular 9 using HammerJS
- HTML | DOM Video controls Property
- HTML | <audio> controls Attribute
- HTML | DOM Audio controls Property
- HTML | <video> controls Attribute
- HTML | controls Attribute
- How to specify a list of pre-defined options for input controls in HTML5?
- Text Animation with changing the color of the text using HTML & CSS
- How to create long shadow of text without using text-shadow in HTML and CSS ?
- How to remove white spaces only beginning/end of a string using PHP ?
- How to remove borders of a canvas-type text using Fabric.js ?
- Set the opacity only to background color not on the text in CSS
- How to Resize Rotation Radius using CSS ?
- PHP | Program to check a string is a rotation of another string
- How to set the view-port meta tag for iPhone that handles rotation properly ?
- How to disable a link using only CSS?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.