mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
No magic numbers!
This commit is contained in:
parent
653dda7000
commit
ff3a76f716
1 changed files with 5 additions and 3 deletions
|
@ -217,6 +217,8 @@ function showConfirmationMessage(selectedID, destination) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var opacity = 2.0,
|
var opacity = 2.0,
|
||||||
|
fadeRate = 0.05,
|
||||||
|
timeBetweenFadesMS = 50,
|
||||||
confirmationMessageContainer = document.createElement("div"),
|
confirmationMessageContainer = document.createElement("div"),
|
||||||
confirmationMessage = document.createElement("div");
|
confirmationMessage = document.createElement("div");
|
||||||
confirmationMessageContainer.className = "confirmationMessageContainer";
|
confirmationMessageContainer.className = "confirmationMessageContainer";
|
||||||
|
@ -243,12 +245,12 @@ function showConfirmationMessage(selectedID, destination) {
|
||||||
document.getElementById(selectedID).appendChild(confirmationMessageContainer);
|
document.getElementById(selectedID).appendChild(confirmationMessageContainer);
|
||||||
|
|
||||||
setInterval(function () {
|
setInterval(function () {
|
||||||
if (opacity <= 0.05) {
|
if (opacity <= fadeRate) {
|
||||||
confirmationMessageContainer.remove();
|
confirmationMessageContainer.remove();
|
||||||
}
|
}
|
||||||
opacity -= 0.05;
|
opacity -= fadeRate;
|
||||||
confirmationMessageContainer.style.opacity = opacity;
|
confirmationMessageContainer.style.opacity = opacity;
|
||||||
}, 50);
|
}, timeBetweenFadesMS);
|
||||||
}
|
}
|
||||||
function showUploadingMessage(selectedID, destination) {
|
function showUploadingMessage(selectedID, destination) {
|
||||||
if (selectedID.id) {
|
if (selectedID.id) {
|
||||||
|
|
Loading…
Reference in a new issue