Skip to content

Commit

Permalink
- Added code that prevents line updates during slide
Browse files Browse the repository at this point in the history
  • Loading branch information
tazle committed Apr 23, 2012
1 parent d279a2c commit 369d75d
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions test.js
Expand Up @@ -62,6 +62,14 @@ function end_timer() {
}
}

function prevent_line_update() {
update_timers += 1;
}

function enable_line_update() {
end_timer();
}

function reset_time_slider(begin, end) {
$( "#time-slider" ).slider({
range: true,
Expand All @@ -73,7 +81,13 @@ function reset_time_slider(begin, end) {
end_time = slider.values[1];
update_ui();
start_timer();
}
},
start: function(event, slider) {
prevent_line_update();
},
stop: function(event, slider) {
enable_line_update();
}
});
$("#range-begin").text(format_hhmm(begin));
$("#range-end").text(format_hhmm(end));
Expand All @@ -92,7 +106,13 @@ function init_color_slider() {
c_superlong = slider.values[3];
update_ui();
start_timer();
}
},
start: function(event, slider) {
prevent_line_update();
},
stop: function(event, slider) {
enable_line_update();
}
});

}
Expand Down

0 comments on commit 369d75d

Please sign in to comment.