UNPKG

@core-graphics/rect

Version:
21 lines (20 loc) 582 B
import { Rect } from "../lite"; export declare type WindowRectOptions = { /** * Whether to exclude the element's scrollbar size from the calculation. */ excludeScrollbar?: boolean; }; /** * Creates a rectange from window object */ export declare function fromWindow(win: Window, opts?: WindowRectOptions): Rect; /** * Get the rect of the window with the option to exclude the scrollbar */ export declare function getWindowRect(win: Window, opts: WindowRectOptions): { x: number; y: number; width: number; height: number; };