-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do I resize a textbox without zoom in/out text? #6740
Comments
You can define some controls for textbox, it just change width or height, not scale it. |
Thank your guide! As your guide, I try to do! The jsfiddle URL is as followed: When I input some text in the drawn textbox, the only width of the textbox is also changed and the height is decreased. I'll wait for good idea to solve this problem! |
Textbox is basically an IText with autowrapping funcionality. |
Thank you for your answer! You used the term autowrapping. I understand 'autorapping' as a function that automatically resize the height of the textbox when entering the text or resizing the textbox. Please let me know which of the issues that I should see! PS(#1) : My goal is to keep the textbox such as the square shape of MS Powerpoint. If I find the method to disable autowrapping, I can achieve my goal! I need your assist, @asturur! PS(#2) : I can find the issue 'Breaking changes on 4.0.0-rc1: hard to overrides fabricJs #6494'! This dowload file is the ZIP file including fabric.js(input the text //2020-12-23 in the cusomizing part) and ggg.html. But the result is not good! I want you to show me an example of how to override! |
No one's giving me any advice! Fortunately, Google Search has obtained examples of override classes using rectangles and textboxes from stack overflow sites and implemented them perfectly. To be honest, the meaning of the override mentioned above was not accurate, and making it very difficult to implement it. I think the biggest problem of fabricjs is "scale". This can cause serious problems(such as the zooming text and so on). Because the scale is changed when the width/height of shapes(especially textbox) are changed by mouse control. I think that fundamental improvement is needed to provide the better way to block scale changes when changing the width/height of fabricjs by mouse control. I hope that you understand my suggestion well. I'll close this issue in a few days. |
@OilPrince this question has been asked many times, and is answered in some other issue. Texbox will anyway reset width/heigth everytime you input text, and that is the part that requires an override. Just to repeat, the free form textbox isn't a fabric feature. Also, there are no people working on the library aside some hours spent in their free time. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I am working on entering text into canvas using textbox.
If I create a textbox, type text, and increase the size of the textbox, it will increase to the size of the text, even though I have specified a text font size.
When I checked the properties of the textbox, the font size, width, and height of the textbox remain the same! I think that the scale(accurately, scale X and scale Y) are changed to display the textbox.
In order to keep the font size specified when using the textbox to increase the size of the textbox, we tried to set scaleX and scaleY to 1 for text:changed events or object:modified events and specify the actual length of the increased width and length. But the results were not very good.
When I change the size of the textbox by the mouse, how can I fix the font size without enlarging it?
How do I resize a textbox without zoom in/out text?
I need some good advice on this.
The text was updated successfully, but these errors were encountered: