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

Make value box size parametrized #70

Closed
yorl1n opened this issue Sep 28, 2016 · 3 comments
Closed

Make value box size parametrized #70

yorl1n opened this issue Sep 28, 2016 · 3 comments
Assignees
Milestone

Comments

@yorl1n
Copy link

yorl1n commented Sep 28, 2016

Now the width of value box is defined as follows:
let tw = context.measureText(options.valueText ? text : ('-' + padValue(0, options))).width;

So the width is defined according to initial value length.

F.e. I don't need leading zeroes and decimals (000.00)-> I specify component as follows:

valueDec: 0,                                     
valueInt: 1,

Initial value is 0, the width of the value box is appropriate. Now I load value 1000 and it looks ugly.
So I propose to move out dimensional config of the value box and make it configurable in px and % (from the total dimensions).

@Mikhus
Copy link
Owner

Mikhus commented Sep 28, 2016

It makes sense, thank you. So I will keep the current behavior as default one and if there would be width specified it will be applied then.
This is scheduled for the next release 2.0.8.

@Mikhus Mikhus self-assigned this Sep 28, 2016
@Mikhus Mikhus added this to the 2.0.8 milestone Sep 28, 2016
@yorl1n
Copy link
Author

yorl1n commented Sep 28, 2016

Thanks!

@Mikhus
Copy link
Owner

Mikhus commented Sep 28, 2016

Implemented in release 2.0.8, published.

@Mikhus Mikhus closed this as completed Sep 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants