Acme-MUDLike

 view release on metacpan or  search on metacpan

lib/Acme/MUDLike.pm  view on Meta::CPAN

2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
        script = null;
 
// If Safari  is used
} else if ( jQuery.browser.safari )
        // Continually check to see if the document.readyState is valid
        jQuery.safariTimer = setInterval(function(){
                // loaded and complete are both valid states
                if ( document.readyState == "loaded" ||
                        document.readyState == "complete" ) {
 
                        // If either one are found, remove the timer
                        clearInterval( jQuery.safariTimer );
                        jQuery.safariTimer = null;
 
                        // and execute any waiting functions
                        jQuery.ready();
                }
        }, 10);
 
// A fallback to window.onload, that will always work
jQuery.event.add( window, "load", jQuery.ready );

lib/Acme/MUDLike.pm  view on Meta::CPAN

3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
        var r = parseFloat( jQuery.curCSS(elem, prop) );
        return r && r > -10000 ? r : z.max();
};
 
// Start an animation from one number to another
z.custom = function(from,to){
        z.startTime = (new Date()).getTime();
        z.now = from;
        z.a();
 
        z.timer = setInterval(function(){
                z.step(from, to);
        }, 13);
};
 
// Simple 'show' function
z.show = function(){
        if ( !elem.orig ) elem.orig = {};
 
        // Remember where we started, so that we can go back to it later
        elem.orig[prop] = this.cur();

lib/Acme/MUDLike.pm  view on Meta::CPAN

3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
                // Begin the animation
                z.custom(elem.orig[prop], 0);
        }              
};
 
// Each step of an animation
z.step = function(firstNum, lastNum){
        var t = (new Date()).getTime();
 
        if (t > options.duration + z.startTime) {
                // Stop the timer
                clearInterval(z.timer);
                z.timer = null;
 
                z.now = lastNum;
                z.a();
 
                if (elem.curAnim) elem.curAnim[ prop ] = true;
 
                var done = true;
                for ( var i in elem.curAnim )
                        if ( elem.curAnim[i] !== true )
                                done = false;



( run in 0.258 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )