Skip to content

Commit

Permalink
Implemented throttling for ScrubberWidget
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed May 29, 2018
1 parent d8e29d6 commit 98cc504
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions holoviews/plotting/widgets/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,20 @@ ScrubberWidget.prototype.set_frame = function(frame){
return
}
widget.value = this.current_frame;
if(this.cached) {
this.update(frame)
} else {
if (this.dynamic || !this.cached) {
if ((this.time !== undefined) && ((this.wait) && ((this.time + 10000) > Date.now()))) {
this.queue.push(frame);
return
}
this.queue = [];
this.time = Date.now();
this.wait = true;
this.dynamic_update(frame)
} else {
this.update(frame)
}
}


ScrubberWidget.prototype.get_loop_state = function(){
var button_group = document[this.loop_select_id].state;
for (var i = 0; i < button_group.length; i++) {
Expand Down

0 comments on commit 98cc504

Please sign in to comment.