Skip to content

Commit 1a819b2

Browse files
committed
Updated distributables
1 parent e568327 commit 1a819b2

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

build/jquery.runner-min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/jquery.runner.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*!
2-
* jQuery-runner - v2.1.3 - 2013-05-22
2+
* jQuery-runner - v2.2.0 - 2013-05-24
33
* https://github.com/jylauril/jquery-runner/
44
* Copyright (c) 2013 Jyrki Laurila <https://github.com/jylauril>
55
*/
66
(function() {
77
var Runner, formatTime, meta, pad, runners, uid, _uid;
88

99
meta = {
10-
version: "2.1.3",
10+
version: "2.2.0",
1111
name: "jQuery-runner"
1212
};
1313

@@ -40,6 +40,7 @@
4040
}
4141
for (i = _i = 0, _len = steps.length; _i < _len; i = ++_i) {
4242
step = steps[i];
43+
value = 0;
4344
if (time >= step) {
4445
value = Math.floor(time / step);
4546
time -= value * step;
@@ -188,6 +189,9 @@
188189

189190
last = this.lastTime;
190191
lap = last - this.lapTime;
192+
if (this.settings.countdown) {
193+
lap = -lap;
194+
}
191195
if (this.running || lap) {
192196
this.lastLap = lap;
193197
this.lapTime = last;
@@ -198,10 +202,16 @@
198202
};
199203

200204
Runner.prototype.reset = function(stop) {
205+
var nowTime;
206+
201207
if (stop) {
202208
this.stop();
203209
}
204-
this.startTime = this.lapTime = this.lastTime = $.now();
210+
nowTime = $.now();
211+
if (typeof this.settings.startAt === 'number' && !this.settings.countdown) {
212+
nowTime -= this.settings.startAt;
213+
}
214+
this.startTime = this.lapTime = this.lastTime = nowTime;
205215
this.total = this.settings.startAt;
206216
this.value(this.total);
207217
this.finished = false;

0 commit comments

Comments
 (0)