summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2010-06-24 15:01:26 +0000
committerorbiter <orbiter@6c8d7289-2bf4-0310-a012-ef5d649a1542>2010-06-24 15:01:26 +0000
commitd5d48b8dc76c585f3544afd8bf956fa242e65b65 (patch)
tree6d918b338bc3a403c0f6f4d20540fde62a86335b
parent103c848af87edf9b7371a075f744eb96d808aabe (diff)
enhanced network animation (smooth loading, reload not all 4 animation phases at once)
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6943 6c8d7289-2bf4-0310-a012-ef5d649a1542
-rw-r--r--htroot/Network.html28
1 files changed, 16 insertions, 12 deletions
diff --git a/htroot/Network.html b/htroot/Network.html
index 04bb1215e..929e9970e 100644
--- a/htroot/Network.html
+++ b/htroot/Network.html
@@ -11,26 +11,30 @@
<script type="text/javascript">
imagestub = "NetworkPicture.png?width=768&height=576&bgcolor=FFFFFF&coronaangle=";
- imageindex = 0;
+ imageanimindex = 0;
+ imageloadindex = 0;
imagecycles = 0;
imagearray = new Array(4);
setTimeout("initanimation()", 100);
setTimeout("doanimation()", 1000);
function initanimation() {
- for (j = 0; j < 4; j++) {
- imagearray[j] = new Image(768, 576);
- angle = j * 90;
- time = new Date().getTime();
- imagearray[j].src = imagestub + angle + "&time=" + time;
- }
+ handle = new Date().getTime();
+ for (j = 0; j < 4; j++) initanimationphase(j, handle);
+ }
+ function initanimationphase(phase, handle) {
+ imagearray[phase] = new Image(768, 576);
+ angle = phase * 90;
+ imagearray[phase].src = imagestub + angle + "&handle=" + handle;
}
function doanimation() {
- document.getElementById("NetworkPicture").src = imagearray[imageindex].src;
- imageindex++;
- if (imageindex == 4) { imageindex = 0; }
+ document.getElementById("NetworkPicture").src = imagearray[imageanimindex].src;
+ imageanimindex++;
+ if (imageanimindex == 4) { imageanimindex = 0; }
imagecycles++;
- if (imagecycles == 100) {
- initanimation();
+ if (imagecycles == 25) {
+ initanimationphase(imageloadindex, new Date().getTime());
+ imageloadindex++;
+ if (imageloadindex == 4) { imageloadindex = 0; }
imagecycles = 0;
}
setTimeout("doanimation()", 100);