Responsive and slick progress bars
They are now available via warnings
option.
New documentation in http://progressbarjs.readthedocs.org/en/1.0.0/
Fixed and updated sauce labs tests
Add text.autoStyleContainer
option
HTML string or DOM element is now possible to pass in opts.text.value
or to .setText
method
breaking: Change behavior default style options. From now on, if you define anything to opts.svgStyle
or opts.text.style
yourself, no default values will be used. This makes customising the styles easier in JS. If you want to only change one single style attribute, you can do it after initializing the progress bar, like this:
var bar = new ProgressBar.Line('#container');
bar.text.style.fontSize = '40px';
Fix https://github.com/kimmobrunfeldt/progressbar.js/issues/107
Contains API breaking changes compared to 0.8.x:
options.text.autoStyle
is replaced with options.text.style
. If you had autoStyle: false
, you should now use options.text.style = null
. That will disable all default styles. New API for style changes improves the control of inline styles.width: 100%;
css style is set for the SVG element.Other additions:
New shape: SemiCircle
Expose more internal modules for customization Shape and utils are now exposed. https://github.com/kimmobrunfeldt/progressbar.js/commit/ffb151d954d7486a96c2b8ed05a4648a1613f206
Upgrade to shifty version 1.5.0, easing can be now specified as a function.
Improve code consistency with linters.
API breaking change for step function! If you haven't used option.attachment, nothing has changed. Most likely you don't need to change anything.
Thanks to @prodigitalson who provided fixes to step function and added a lot of tests.
All changes:
API breaking change to step function:
Before this release, Shape was passed as an attachment to Path. If you overrode the attachment, there was no way to get reference to the Shape inside step function. Before:
step: function(state, attachment) {
// Do step
}
Now you can always reference to the Shape or Path inside the step function. Reference to self is passed as second parameter. User's custom attachment is now passed as the third parameter After:
step: function(state, self, attachment) {
// self is reference to Shape or Path
// Do step
}
Expose SVG path element as .path attribute for Path objects. That is consistent with Shape objects.
Make it possible to pass selector as a string to Path object. Earlier only direct element was accepted.
More tests
These were fixed and released fast because some functionality was broken
Adds .text and .setText() to API, but is backwards compatible