UNPKG

@drozdik.m/dimensions-helper

Version:

Simple helper for getting dimensions (basic, padding, border, margin)

52 lines (51 loc) 1.3 kB
export declare class DimensionsHelper { private element; private style; /** * Creates active container for providing * @param element */ constructor(element: HTMLElement); /** * Returns width of the element * */ Width(): number; /** * Returns height of the element * */ Height(): number; /** * Sets new width to the element * @param width New width */ SetWidth(width: number): void; /** * Sets new height to the element * @param height New height */ SetHeight(height: number): void; /** * Returns width with padding of the element * */ WidthWithPadding(): number; /** * Returns height with padding of the element * */ HeightWithPadding(): number; /** * Returns width with padding and border of the element * */ WidthWithBorder(): number; /** * Returns height with padding and border of the element * */ HeightWithBorder(): number; /** * Returns width with padding, border and margin of the element * */ WidthWithMargin(): number; /** * Returns height with padding, border and margin of the element * */ HeightWithMargin(): number; }