diff -r cb7dde69c301 -r d7fc25acd3f3 includes/clientside/static/flyin.js --- a/includes/clientside/static/flyin.js Wed Aug 01 13:39:27 2007 -0400 +++ b/includes/clientside/static/flyin.js Sun Aug 05 15:58:50 2007 -0400 @@ -157,94 +157,8 @@ } - /* - * Framestepper parameters - * / - - // starting value for inertia - var inertiabase = 1; - // increment for inertia, or 0 to disable inertia effects - var inertiainc = 1; - // when the progress reaches this %, deceleration is activated - var divider = 0.666667; - // multiplier for deceleration, setting this above 2 can cause some weird slowdown effects - var decelerate = 2; // 1 / divider; // reciprocal of the divider - - /* - * Timer parameters - * / - - // how long animation start is delayed, you want this at 0 - var timer = 0; - // frame ttl - var timestep = 12; - // sanity check - var frames = 0; - - // cache element so it can be changed from within setTimeout() - var rand_seed = Math.floor(Math.random() * 1000000); - fly_in_cache[rand_seed] = element; - - // set element left pos, you can comment this out to preserve left position - element.style.left = left + 'px'; - - // total distance to be traveled - dist = abs(top - topi); - - // animation loop + // old framestepper code removed from here in Loch Ness - while ( true ) - { - // used for a sanity check - frames++; - - // time until this frame should be executed - timer += timestep; - - // math stuff - // how far we are along in animation... - diff = abs(top - topi); - // ...in % - ratio = abs( 1 - ( diff / dist ) ); - // decelerate if we're more than 2/3 of the way there - if ( ratio < divider ) - inertiabase += inertiainc; - else - inertiabase -= ( inertiainc * decelerate ); - - // if the deceleration factor is anywhere above 1 then technically that can cause an infinite loop - // so leave this in there unless decelerate is set to 1 - if ( inertiabase < 1 ) - inertiabase = 1; - - // uncomment to disable inertia - // inertiabase = 3; - - // figure out frame Y position - topi = ( abs_dir == FI_UP ) ? topi - inertiabase : topi + inertiabase; - if ( ( abs_dir == FI_DOWN && topi > top ) || ( abs_dir == FI_UP && top > topi ) ) - topi = top; - - // tell the browser to do it - setTimeout('var o = fly_in_cache['+rand_seed+']; o.style.top=\''+topi+'px\';', timer); - if ( !nofade ) - { - // handle fade - opac_factor = ratio * 100; - if ( direction == FI_OUT ) - opac_factor = 100 - opac_factor; - setTimeout('var o = fly_in_cache['+rand_seed+']; domObjChangeOpac('+opac_factor+', o);', timer); - } - - // if we're done or if our sanity check failed then break out of the loop - if ( ( abs_dir == FI_DOWN && topi >= top ) || ( abs_dir == FI_UP && top >= topi ) || frames > 1000 ) - break; - } - - timer += timestep; - setTimeout('delete(fly_in_cache['+rand_seed+']);', timer); - return timer; - */ timeout += timerstep; return timeout; }