export class DOMAlign { constructor() { } public convertPointToScreen() { } public static getAbsoluteOuterCornerTopLeft(anchorEl: HTMLElement, targetEl: HTMLElement, ox: number = 0, oy: number = 0) { let ar = anchorEl.getBoundingClientRect() let tr = targetEl.getBoundingClientRect() return { b: ar.height - oy, l: - tr.width + ox, r: ar.width - ox, t: - tr.height + oy, fb: ar.top + oy <= window.innerHeight, fl: ar.left - tr.width + ox >= 0, fr: ar.left + ox <= window.innerWidth, ft: ar.top - tr.height + oy >= 0 } } }