packages/plugins/resize/dist/index.js
function fireComponentResizeEvent(event) {
        frameIsRequested = false;
        if (!componentInformation) {
            return;
        }
        var newSizes = componentInformation.map(function (_a) {
            var node = _a.node;
            return ({
                width: node.clientWidth,
                height: node.clientHeight
            });
        });
        var handlerResults = [];
        componentInformation.forEach(function (componentInformation, i) {
            var newSize = newSizes[i];
            // Skip if the size did not change
            if (newSize.width === componentInformation.width &&
                newSize.height === componentInformation.height) {
                return;
            }
            // Skip if the component is not running anymore
            if (componentInformation.component._stopped) {
                return;
            }
            componentInformation.component.__resizeSize = newSize;
            componentInformation.width = newSize.width;
            componentInformation.height = newSize.height;
            componentInformation.selectors.forEach(function (selector) {
                return selector.forEach(function (handler) {
                    return handlerResults.push(handler.call(componentInformation.component, event, newSize));
                });
            });
        });
        handlerResults.forEach(function (handlerResult) {
            if (typeof handlerResult === "function") {
                handlerResult();
            }
        });
    }
function fireComponentResizeEvent(event) {
        frameIsRequested = false;
        if (!componentInformation) {
            return;
        }
        var newSizes = componentInformation.map(function (_a) {
            var node = _a.node;
            return ({
                width: node.clientWidth,
                height: node.clientHeight
            });
        });
        var handlerResults = [];
        componentInformation.forEach(function (componentInformation, i) {
            var newSize = newSizes[i];
            // Skip if the size did not change
            if (newSize.width === componentInformation.width &&
                newSize.height === componentInformation.height) {
                return;
            }
            // Skip if the component is not running anymore
            if (componentInformation.component._stopped) {
                return;
            }
            componentInformation.component.__resizeSize = newSize;
            componentInformation.width = newSize.width;
            componentInformation.height = newSize.height;
            componentInformation.selectors.forEach(function (selector) {
                return selector.forEach(function (handler) {
                    return handlerResults.push(handler.call(componentInformation.component, event, newSize));
                });
            });
        });
        handlerResults.forEach(function (handlerResult) {
            if (typeof handlerResult === "function") {
                handlerResult();
            }
        });
    }
function fireComponentResizeEvent ( event ) { frameIsRequested = false ; if ( ! componentInformation ) { return ; } var newSizes = componentInformation . map ( function ( _a ) { var node = _a . node ; return ( { width : node . clientWidth , height : node . clientHeight } ) ; } ) ; var handlerResults = [ ] ; componentInformation . forEach ( function ( componentInformation , i ) { var newSize = newSizes [ i ] ; // Skip if the size did not change if ( newSize . width === componentInformation . width && newSize . height === componentInformation . height ) { return ; } // Skip if the component is not running anymore if ( componentInformation . component . _stopped ) { return ; } componentInformation . component . __resizeSize = newSize ; componentInformation . width = newSize . width ; componentInformation . height = newSize . height ; componentInformation . selectors . forEach ( function ( selector ) { return selector . forEach ( function ( handler ) { return handlerResults . push ( handler . call ( componentInformation . component , event , newSize ) ) ; } ) ; } ) ; } ) ; handlerResults . forEach ( function ( handlerResult ) { if ( typeof handlerResult === "function" ) { handlerResult ( ) ; } } ) ; }
Check which modules changed in size, are still running and call their event handler
Check which modules changed in size are still running and call their event handler