ViewData: {
    isIntersecting: boolean;
    relative: {
        bottom: number;
        height: number;
        hMiddle: number;
        left: number;
        right: number;
        top: number;
        vMiddle: number;
        width: number;
        x: number;
        y: number;
    };
    rootBounds: BoundingRect;
    targetBounds: BoundingRect;
    views: [View, View?];
}

Type declaration

  • isIntersecting: boolean
  • relative: {
        bottom: number;
        height: number;
        hMiddle: number;
        left: number;
        right: number;
        top: number;
        vMiddle: number;
        width: number;
        x: number;
        y: number;
    }

    This is the target's position relative to the root with values relative to the root size.

    It is like the targetBounds except that each quantity is scaled by the root's width or height, and having two additional computed values.

    • bottom: number
    • height: number
    • hMiddle: number

      Average of the relative left and right.

    • left: number
    • right: number
    • top: number
    • vMiddle: number

      Average of the relative top and bottom.

    • width: number
    • x: number
    • y: number
  • rootBounds: BoundingRect
  • targetBounds: BoundingRect
  • views: [View, View?]

    The current view or views of the target. There would be two views given only if the target is not in view and it's diagonally across from the root, e.g. both below and to the right.