Skip to content

Commit

Permalink
add an onFinished event to complement onClear; rearrange slightly so …
Browse files Browse the repository at this point in the history
…you don't get both when clearing
  • Loading branch information
willbryant committed Jun 23, 2011
1 parent 35e908e commit 5bb5d99
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions timeframe.js
Expand Up @@ -443,10 +443,13 @@ var Timeframe = Class.create({
if (!this.dragging) return;
if (!this.stuck) {
this.dragging = false;
if (event.findElement('span.clear span.active'))
this.clearRange();
if (this.timer)
clearInterval(this.timer);
if (event.findElement('span.clear span.active')) {
this.clearRange();
} else {
if (this.options.keys().include('onFinished')) this.options.get('onFinished')();
}
}
this.mousedown = false;
this.refreshRange();
Expand Down

0 comments on commit 5bb5d99

Please sign in to comment.