jeremyckahn / mantra

A professional web animation tool for everyone
https://jeremyckahn.github.io/mantra/
Other
184 stars 15 forks source link

Add default value unit #3

Closed alextegelid closed 7 years ago

alextegelid commented 7 years ago

Instead of just disregarding the input, append a default unit (px) or the previous unit specified in that input box (deg, px, em etc.).

Demo: https://cl.ly/2E2T1J2P461C

jeremyckahn commented 7 years ago

Hi @alextegelid, thanks for reporting this! This behavior is deliberate; it is to ensure that the UI is always in a valid state when not being actively modified (in other words, when no inputs are focused). If the "Value" field is in the correct format (such as *px or *deg, it depends on the transform property in question), the value of the input is not automatically reverted when blurred.

That being said, there may be more a graceful way to handle this. I like your idea of adding in some logic to automatically append the unit to the input, so I will give that a try.

I'm a bit flooded with triaging issues and responding to feedback from the Reddit post I made for Mantra, so I can't fix this right now. However, I will leave this open and get to it as soon as I have a moment!

jeremyckahn commented 7 years ago

I have preliminary fixes for this and #2. I will bundle these into a release along with a few other fixes within the next day or so.

alextegelid commented 7 years ago

Sounds good! Looking forward to it

jeremyckahn commented 7 years ago

This has been deployed. Thanks for reporting!