loading-bar icon indicating copy to clipboard operation
loading-bar copied to clipboard

Multiple features

Open ceremcem opened this issue 5 years ago • 0 comments

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

ceremcem avatar Aug 02 '20 13:08 ceremcem