Sha256: dd1b3af6959c1fac6a9ece0d7865a767a284102d555cce405f654e58fb3e7294

Contents?: true

Size: 1010 Bytes

Versions: 10

Compression:

Stored size: 1010 Bytes

Contents

/**
 * Private utility class that manages the internal Shadow cache.
 * @private
 */
Ext.define('Ext.ShadowPool', {
    singleton: true,
    requires: ['Ext.DomHelper'],

    markup: (function() {
        return Ext.String.format(
            '<div class="{0}{1}-shadow" role="presentation"></div>',
            Ext.baseCSSPrefix,
            Ext.isIE && !Ext.supports.CSS3BoxShadow ? 'ie' : 'css'
        );
    }()),

    shadows: [],

    pull: function() {
        var sh = this.shadows.shift();
        if (!sh) {
            sh = Ext.get(Ext.DomHelper.insertHtml("beforeBegin", document.body.firstChild, this.markup));
            sh.autoBoxAdjust = false;
        }
        return sh;
    },

    push: function(sh) {
        this.shadows.push(sh);
    },
    
    reset: function() {
        var shadows = [].concat(this.shadows),
            s,
            sLen    = shadows.length;

        for (s = 0; s < sLen; s++) {
            shadows[s].remove();
        }

        this.shadows = [];
    }
});

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
gb_mapfish_appserver-0.0.5 vendor/assets/javascripts/ext/ext-4.1.1a/src/ShadowPool.js
gb_mapfish_appserver-0.0.4 vendor/assets/javascripts/ext/ext-4.1.1a/src/ShadowPool.js
gb_mapfish_appserver-0.0.3 vendor/assets/javascripts/ext/ext-4.1.1a/src/ShadowPool.js
gb_mapfish_appserver-0.0.2 vendor/assets/javascripts/ext/ext-4.1.1a/src/ShadowPool.js
gb_mapfish_appserver-0.0.1 vendor/assets/javascripts/ext/ext-4.1.1a/src/ShadowPool.js
extjs-rails-4.1.0.alpha5 app/assets/javascripts/src/ShadowPool.js
extjs-rails-4.1.0.alpha4 app/assets/javascripts/extjs-rails/src/ShadowPool.js
extjs-rails-4.1.0.alpha3 app/assets/javascripts/extjs-rails/src/ShadowPool.js
extjs-rails-4.1.0.alpha2 app/assets/javascripts/extjs-rails/src/ShadowPool.js
extjs-rails-4.1.0.alpha1 app/assets/javascripts/extjs-rails/src/ShadowPool.js