commit f4e4f27279a4346c465c22adc84566c242282563
parent 560eb37d0b1d6a354f842c2d6bf90e9d8ab889ed
Author: Joscha Legewie <joscha.legewie@gmail.com>
Date: Tue, 12 Apr 2016 14:23:59 -0500
Bug fix progressWindow.js: nArcs undefined
`nArcs` is undefined in `this.ItemProgress.prototype.setProgress()`. This has been the case for a long time but never came up because the progress indicator isn't used in Zotero, I believe. I think it's a nice UI element though and could be used for non-disruptive progress indicators.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/chrome/content/zotero/xpcom/progressWindow.js b/chrome/content/zotero/xpcom/progressWindow.js
@@ -332,6 +332,7 @@ Zotero.ProgressWindow = function(_window = null) {
this.ItemProgress.prototype.setProgress = _deferUntilWindowLoad(function(percent) {
if(percent != 0 && percent != 100) {
// Indication of partial progress, so we will use the circular indicator
+ var nArcs = 20;
this._image.style.backgroundImage = "url('chrome://zotero/skin/progress_arcs.png')";
this._image.style.backgroundPosition = "-"+(Math.round(percent/100*nArcs)*16)+"px 0";
this._hbox.style.opacity = percent/200+.5;