UNPKG

@studiohyperdrive/ngx-tour

Version:

A lightweight and customizable Angular help tour approach using Angular CDK.

15 lines (14 loc) 621 B
import { NgxTourStepOffset } from '../../types'; /** * Determines whether an element is visible in the viewport. * It calculates the position that should be scrolled to, taking into account the provided offset and * the relative position of the element to the center of the viewport.s * * @param element - The provided element * @param offset - The optional configurable margin around the cutout */ export declare const elementIsVisibleInViewport: (element: HTMLElement, margin: number, offset?: NgxTourStepOffset) => { isVisible: boolean; scrollY: number | undefined; relativeTo: "top" | "bottom"; };