TimerView: Update only as often as 500ms
FREEBIE
This commit is contained in:
parent
5351b60365
commit
9a09e7a16b
1 changed files with 1 additions and 1 deletions
|
@ -41,8 +41,8 @@
|
||||||
var remainingTime = this.model.msTilExpire();
|
var remainingTime = this.model.msTilExpire();
|
||||||
var elapsed = (totalTime - remainingTime) / totalTime;
|
var elapsed = (totalTime - remainingTime) / totalTime;
|
||||||
this.$('.sand').css('transform', 'translateY(' + elapsed*100 + '%)');
|
this.$('.sand').css('transform', 'translateY(' + elapsed*100 + '%)');
|
||||||
this.timeout = setTimeout(this.update.bind(this), totalTime / 100);
|
|
||||||
this.$el.css('display', 'inline-block');
|
this.$el.css('display', 'inline-block');
|
||||||
|
this.timeout = setTimeout(this.update.bind(this), Math.max(totalTime / 100, 500));
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue