gauge
Advanced tools
Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "gauge", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "A terminal based horizontal guage", | ||
@@ -5,0 +5,0 @@ "main": "progress-bar.js", |
@@ -44,2 +44,9 @@ "use strict" | ||
this.last = new Date(0) | ||
var self = this | ||
this._handleSizeChange = function () { | ||
if (!self.showing) return | ||
self.hide() | ||
self.show() | ||
} | ||
} | ||
@@ -74,2 +81,10 @@ ProgressBar.prototype = {} | ||
ProgressBar.prototype._enableResizeEvents = function() { | ||
process.stdout.on('resize', this._handleSizeChange) | ||
} | ||
ProgressBar.prototype._disableResizeEvents = function() { | ||
process.stdout.removeListener('resize', this._handleSizeChange) | ||
} | ||
ProgressBar.prototype.disable = function() { | ||
@@ -76,0 +91,0 @@ this.hide() |
@@ -33,2 +33,7 @@ gauge | ||
If you resize your terminal in a way that can be detected then the gauge | ||
will be drawn at the new size. As a general rule, growing your terminal will | ||
be clean, but shrinking your terminal will result in cruft as we don't have | ||
enough information to know where what we wrote previously is now located. | ||
The **options** object can have the following properties, all of which are | ||
@@ -35,0 +40,0 @@ optional: |
45202
8
364
167