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

Multiple features #42

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Multiple features #42

wants to merge 4 commits into from

Conversation

ceremcem
Copy link
Contributor

@ceremcem ceremcem commented Aug 2, 2020

Changelog

Fixes label decimal points

When label has an integer value at some point, the trailing
zero is removed, so the label div narrows a bit. This causes
an annoying flickering effect. This commit fixes by forcing
output value to have appropriate number of zeroes regarding
to the "precision" setting.

Add background image support

A custom background image can be set via img2 field. It might not be a very good name. This feature makes it possible to create such progress bars using a background and a progress image:

Thermometer

Putting thermometer2-background and thermometer2-progress, the following progress can be produced:

thermometer

Initialization options should include limit-top and limit-bottom settings. For the thermometer example, the progress part starts at 17% and ends at 92% of the image. That's why the options should include

opts = {
  'limit-top': 0.92,
  'limit-bottom': 0.17
}

limit-top and limit-bottom are used for determining the clipping length.

Truck

Putting fuel-truck-background and fuel-truck-progress, the following progress can be produced:

truck

Cerem Cem ASLAN added 4 commits August 2, 2020 04:56
When label has an integer value at some point, the trailing
zero is removed, so the label div narrows a bit. This causes
an annoying flickering effect. This commit fixes by forcing
output value to have appropriate number of zeroes regarding
to the "precision" setting.
@ceremcem ceremcem changed the title Fixes label decimal points Multiple features Aug 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant