import { IAreaSizeCalculationOptions } from "../../interface/calculation/IAreaSizeCalculationOptions"; import { IAreaSizeCalculation } from "../../interface/calculation/IAreaSizeCalculation"; /** * Calculation logic for area sizes */ export declare class AreaSizeCalculation implements IAreaSizeCalculation { /** * Modifies sizes of areas in the list by totalSize * * @param areas list of areas to be modified * @param sourceAreaIndex index of area that triggered modification (will not be modified [a second time]) * @param totalSize size to be added / subtracted to / from areas within the list * @param containerSizePixel size of the container in pixel * @param gutterSizePxPerVisibleComponent size of the gutter in pixel per visible component * @param direction direction of modification starting from sourceAreaIndex * @returns size left, that couldnt be added / subtracted to / from the areas within the list */ private static modifyAreaSizes; /** * Modifies size of the area by given size * * @param area Area to be modified * @param sizeToBeModified Size to be added / subtracted to / from the area * @param containerSize Size of the container * @param gutterSizePxPerVisibleComponent gutter size in px per visible component * * @returns left size that couldn't be added / subtracted to / from * the area (through min / max restrictions) */ private static modifyAreaSize; /** * Subtracts size of the area by given size * * @param area Area to be subtracted it's size * @param sizeToBeSubtracted Size to be subtracted from the area * @param containerSize Size of the container * @param gutterSizePxPerVisibleComponent size of the gutter in px per visible component * @returns size that was subtracted */ private static subtractSizeFromArea; /** * Adds size to the area by given size * * @param area Area to be added something to it's size * @param sizeToBeAdded Size to be added to the area * @param containerSize Size of the container * @param gutterSizePxPerVisibleComponent size of the gutter in px per visible component * @returns size that was subtracted */ private static addSizeToArea; /** * Calculates area sizes according to given IAreaSizeCalculationOptions */ calculate(opts: IAreaSizeCalculationOptions): void; /** * Calculates area sizes when gutters are dragged * (according to given AreaDragAndDrop inside IAreaSizeCalculationOptions) */ protected handleDragAndDrop(opts: IAreaSizeCalculationOptions): void; /** * Calculates area sizes when the window:resize-event was triggered */ protected handleWindowResize(opts: IAreaSizeCalculationOptions): void; /** * Calculates area sizes for normal layouting (first display, area-list changes, ...) */ protected handleNormalLayout(opts: IAreaSizeCalculationOptions): void; protected checkAndFixSizePxRestrictions(opts: IAreaSizeCalculationOptions): void; /** * Checks and fixes -Components that have minSizePx / maxSizePx configured * * @throws E-00001 - area sizes could not be calculated fixing minSizePx / maxSizePx */ protected checkAndFixSizePxRestrictedAreas(opts: IAreaSizeCalculationOptions, restrictionProperty: 'min' | 'max'): void; /** * Modifies areas adding available space * * @param areas list of areas to be modified * @param sourceAreaIndex index of area that triggered modification (will not be modified [a second time]) * @param availableSpace size to be added / subtracted to / from areas within the list * @param containerSizePixel size of the container in pixel * @param gutterSizePxPerVisibleComponent size of the gutter in pixel per visible component * * @returns space left after adding/removing from/to all available areas */ private addAvailableSpaceToAreas; }