src/aria/widgets/container/Container.js
function (propagate) {
            // PROFILING // this.$logTimestamp("updateContainerSize");
            var cfg = this._cfg, domElt = this.getDom();

            if (!domElt) {
                return;
            }

            var widthConf = this._getWidthConf();
            var heightConf = this._getHeightConf();

            if (this._changedContainerSize || this._sizeConstraints) { // if we are bound to min and max size
                if (this._changedContainerSize) {
                    // when maximized from start, widthMaximized will be empty initially, but it'll be adjusted later
                    var width = cfg.widthMaximized || cfg.width;
                    var height = cfg.heightMaximized || cfg.height;
                    var constrainedWidth = ariaUtilsMath.normalize(width, widthConf.min, widthConf.max);
                    var constrainedHeight = ariaUtilsMath.normalize(height, heightConf.min, heightConf.max);

                    domElt.style.width = width > -1 ? constrainedWidth + "px" : "";
                    domElt.style.height = height > -1 ? constrainedHeight + "px" : "";
                    if (this._frame) { // this is required if the frame is being shrinked
                        var frameWidth = width > -1 ? constrainedWidth : -1;
                        var frameHeight = height > -1 ? constrainedHeight : -1;
                        this._frame.resize(frameWidth, frameHeight);
                    }
                }

                var changed = ariaUtilsSize.setContrains(domElt, widthConf, heightConf);
                if (changed && this._frame) {
                    this._frame.resize(changed.width, changed.height);
                    // throws a onchange event on parent
                    if (domElt.parentNode && propagate) {
                        aria.utils.Delegate.delegate(aria.DomEvent.getFakeEvent('contentchange', domElt.parentNode));
                    }
                }
                this._changedContainerSize = changed;
            }
        }
function (propagate) {
            // PROFILING // this.$logTimestamp("updateContainerSize");
            var cfg = this._cfg, domElt = this.getDom();

            if (!domElt) {
                return;
            }

            var widthConf = this._getWidthConf();
            var heightConf = this._getHeightConf();

            if (this._changedContainerSize || this._sizeConstraints) { // if we are bound to min and max size
                if (this._changedContainerSize) {
                    // when maximized from start, widthMaximized will be empty initially, but it'll be adjusted later
                    var width = cfg.widthMaximized || cfg.width;
                    var height = cfg.heightMaximized || cfg.height;
                    var constrainedWidth = ariaUtilsMath.normalize(width, widthConf.min, widthConf.max);
                    var constrainedHeight = ariaUtilsMath.normalize(height, heightConf.min, heightConf.max);

                    domElt.style.width = width > -1 ? constrainedWidth + "px" : "";
                    domElt.style.height = height > -1 ? constrainedHeight + "px" : "";
                    if (this._frame) { // this is required if the frame is being shrinked
                        var frameWidth = width > -1 ? constrainedWidth : -1;
                        var frameHeight = height > -1 ? constrainedHeight : -1;
                        this._frame.resize(frameWidth, frameHeight);
                    }
                }

                var changed = ariaUtilsSize.setContrains(domElt, widthConf, heightConf);
                if (changed && this._frame) {
                    this._frame.resize(changed.width, changed.height);
                    // throws a onchange event on parent
                    if (domElt.parentNode && propagate) {
                        aria.utils.Delegate.delegate(aria.DomEvent.getFakeEvent('contentchange', domElt.parentNode));
                    }
                }
                this._changedContainerSize = changed;
            }
        }
function ( propagate ) { // PROFILING // this.$logTimestamp("updateContainerSize"); var cfg = this . _cfg , domElt = this . getDom ( ) ; if ( ! domElt ) { return ; } var widthConf = this . _getWidthConf ( ) ; var heightConf = this . _getHeightConf ( ) ; if ( this . _changedContainerSize || this . _sizeConstraints ) { // if we are bound to min and max size if ( this . _changedContainerSize ) { // when maximized from start, widthMaximized will be empty initially, but it'll be adjusted later var width = cfg . widthMaximized || cfg . width ; var height = cfg . heightMaximized || cfg . height ; var constrainedWidth = ariaUtilsMath . normalize ( width , widthConf . min , widthConf . max ) ; var constrainedHeight = ariaUtilsMath . normalize ( height , heightConf . min , heightConf . max ) ; domElt . style . width = width > - 1 ? constrainedWidth + "px" : "" ; domElt . style . height = height > - 1 ? constrainedHeight + "px" : "" ; if ( this . _frame ) { // this is required if the frame is being shrinked var frameWidth = width > - 1 ? constrainedWidth : - 1 ; var frameHeight = height > - 1 ? constrainedHeight : - 1 ; this . _frame . resize ( frameWidth , frameHeight ) ; } } var changed = ariaUtilsSize . setContrains ( domElt , widthConf , heightConf ) ; if ( changed && this . _frame ) { this . _frame . resize ( changed . width , changed . height ) ; // throws a onchange event on parent if ( domElt . parentNode && propagate ) { aria . utils . Delegate . delegate ( aria . DomEvent . getFakeEvent ( 'contentchange' , domElt . parentNode ) ) ; } } this . _changedContainerSize = changed ; } }
Update the size of the container according to its width, height, minWidth, maxWidth, minHeight, maxHeight
properties.
@param {Boolean} propagate propagate change to parent
Update the size of the container according to its width height minWidth maxWidth minHeight maxHeight properties .