Outline.prototype.getTransitionSizes = function()

in lib/@uncharted/strippets/src/strippets.outline.js [754:780]


Outline.prototype.getTransitionSizes = function(transitionToState) {
    var s = this;

    var currentOutlineSizes = {
        height: s.$outline.height(), width: s.$outline.width(),
    };
    var transitionCompleteSize = {height: currentOutlineSizes.height, width: currentOutlineSizes.width};

    if (transitionToState || s.isInTransition()) {
        var toState = transitionToState || s.getToState();
        if (toState === 'readingmode') {
            transitionCompleteSize = {
                height: transitionCompleteSize.height,
                width: Reader.prototype.getActualReaderWidth.call(s.reader, s.Settings.reader, s.$outline)
                + s.Settings.maincontent.minimizedWidth
                + ((s.Settings.sidebarEnabled && s.sidebar) ? s.Settings.sidebar.minimizedWidth : 0),
            };
        } else { // minimized
            transitionCompleteSize = {
                height: transitionCompleteSize.height,
                width: s.Settings.maincontent.minimizedWidth
                + ((s.Settings.sidebarEnabled && s.sidebar) ? s.Settings.sidebar.minimizedWidth : 0),
            };
        }
    }
    return {current: currentOutlineSizes, anticipated: transitionCompleteSize};
};