mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-05-23 12:59:11 -04:00
Merge branch 'master' of git@github.com:gallery/gallery3
This commit is contained in:
@@ -5,14 +5,18 @@
|
||||
var delta = 1;
|
||||
animate_progress_bar = function() {
|
||||
var current_value = Number($(".gProgressBar div").css("width").replace("%", ""));
|
||||
if (current_value != target_value) {
|
||||
if (target_value > current_value) {
|
||||
// speed up
|
||||
delta = Math.min(delta + 0.04, 3);
|
||||
} else {
|
||||
// slow down
|
||||
delta = Math.max(delta - 0.05, 1);
|
||||
}
|
||||
|
||||
if (target_value == 100) {
|
||||
$(".gProgressBar").progressbar("value", 100);
|
||||
} else if (current_value != target_value || delta != 1) {
|
||||
var new_value = Math.min(current_value + delta, target_value);
|
||||
if (target_value - current_value > delta) {
|
||||
delta += .075;
|
||||
}
|
||||
if (target_value == 100) {
|
||||
new_value = 100;
|
||||
}
|
||||
$(".gProgressBar").progressbar("value", new_value);
|
||||
animation = setTimeout(function() { animate_progress_bar(target_value); }, 100);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user