mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Begin changing ProgressBarRenderer to an ES class.
This commit is contained in:
@@ -241,20 +241,22 @@ class SpinnerRenderer {
|
||||
}
|
||||
|
||||
// Renders a progressbar. Based on the npm 'progress' module, but tailored to our needs (i.e. renders to string)
|
||||
var ProgressBarRenderer = function (format, options) {
|
||||
var self = this;
|
||||
class ProgressBarRenderer {
|
||||
constructor(format, options) {
|
||||
var self = this;
|
||||
|
||||
options = options || {};
|
||||
options = options || {};
|
||||
|
||||
self.fmt = format;
|
||||
self.curr = 0;
|
||||
self.total = 100;
|
||||
self.maxWidth = options.maxWidth || self.total;
|
||||
self.chars = {
|
||||
complete : '=',
|
||||
incomplete : ' '
|
||||
};
|
||||
};
|
||||
self.fmt = format;
|
||||
self.curr = 0;
|
||||
self.total = 100;
|
||||
self.maxWidth = options.maxWidth || self.total;
|
||||
self.chars = {
|
||||
complete : '=',
|
||||
incomplete : ' '
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
_.extend(ProgressBarRenderer.prototype, {
|
||||
asString: function (availableSpace) {
|
||||
|
||||
Reference in New Issue
Block a user