Skip to content
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

Cannot use width/height inputs to resize images to any dimension lower than 320 #643

Closed
philipeatela opened this issue Sep 21, 2021 · 1 comment
Labels

Comments

@philipeatela
Copy link

Summary
On the Resizing menu, when attempting to type values into the width and height fields (instead of using the sliders to increase/reduce the image), whenever I try to type something it just replaces it with 32 (which I assume is the minimum allowed size for the image), that is unless the number I'm typing begins with a value higher than 32 (i.e: typing in 700 works, typing in 250 does not).

I believe the editor is detecting me attempting to type in a value lower than 32 on the input, and then auto-correcting it to this value to prevent the user trying to set the image smaller than possible. However, the delay on it is way too small, and if I just want to type in 100 for example, I can't really do that through the input.

Screenshots
image

Version
Using on React v3.15, but this is easily reproduceable here https://nhn.github.io/tui.image-editor/latest/tutorial-example01-includeUi on the online demo

Additional context
I was about to open this as a bug because it pretty much makes it impossible for anyone to resize images to any value lower than 320, because when you begin typing what you want, it just replaces it instantly. However, I thought I'd ask if this is expected behavior first.

Anyway, in case this is expected, does any one know how I could go about preventing this behavior? Some of the solutions that crossed my mind:

  1. Is it possible for me to easily set which is the minimum image size? This way I could set it to 1 so that people can type in whatever they like without it being replaced on the input
  2. Is there a way for us to increase the delay before the input auto-corrects the value? This way, if someone types in like 250, it wouldn't detect the "25" and replace it before the user is done typing.

Thank you for the attention and let's see if we can work around this!

And, before I forget, thanks to the maintainers for providing us with this awesome library!

@lja1018
Copy link
Contributor

lja1018 commented Sep 28, 2021

@philipeatela
Thank you for reporting the improvements.
I think it'll improve through #646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants