Colibrio Reader Framework API - Cloud license
    Preparing search index...

    Interface IVisibleContentClippingRectExperimental

    An element inside the publication content that can clip its descendants, as reported in IVisibleContentAreaRectsResult.clippingRects.

    Only elements within the publication content are represented. Clipping by the page or viewport boundary is not, so a clippingRectIndex of null means that no further publication element can clip this one — not that nothing does.

    This API is experimental and might be subject to changes in future releases.

    interface IVisibleContentClippingRect {
        clientRect: DOMRect;
        clippedClientRect: DOMRect;
        clippingRectIndex: number;
        clipsX: boolean;
        clipsY: boolean;
        contentLocation: IContentLocation;
        scrollsX: boolean;
        scrollsY: boolean;
        toJSON(): IVisibleContentClippingRectData;
    }

    Properties

    clientRect: DOMRect

    The box this element clips its content to: the element's padding box, which excludes borders and any scrollbar gutter. For a table in the collapsing border model, it is the border box. Coordinates are in application viewport coordinate space.

    Any transform applied to the ReaderView, such as the user pinch-zooming, will make this rectangle out of date.

    clippedClientRect: DOMRect

    The part of clientRect that remains after this element's clipping ancestors clip it, or undefined when they clip it away entirely.

    It is clientRect intersected with every clipping rect along the chain that starts at this element's own clippingRectIndex, so an element is clipped by its ancestors and never by itself. Clipping rects with clipsX clip it horizontally, and those with clipsY clip it vertically. Only elements inside the publication content clip. The page boundary, the content display area and the reading area do not, so this rectangle may extend beyond them.

    When no ancestor clips this element, it equals clientRect.

    Content and clipping elements are measured separately, so an edge they share can differ by a tiny fraction of a pixel. A cut that small is ignored, so this rectangle can extend that far past a clipping rect. When clipping cuts a width or height down to that much or less, it is undefined.

    Coordinates are in application viewport coordinate space. Any transform applied to the ReaderView, such as the user pinch-zooming, will make this rectangle out of date.

    clippingRectIndex: number

    Index into IVisibleContentAreaRectsResult.clippingRects of the nearest ancestor element that can clip this element, or null when there is no such ancestor. The index is set whether or not that ancestor clips this element.

    clipsX: boolean

    Whether this element clips content that overflows horizontally.

    clipsY: boolean

    Whether this element clips content that overflows vertically.

    contentLocation: IContentLocation

    The content location of the clipping element itself.

    Two entries in IVisibleContentAreaRectsResult.clippingRects may have the same location, in two cases. A framework-injected wrapper element resolves to the element it wraps. An element whose content continues on another visible page has one entry per page.

    scrollsX: boolean

    Whether this element is a horizontal scroll container — its computed overflow-x is auto or scroll.

    This describes the element's overflow configuration, not whether it can be scrolled right now. A consumer needing live scroll state must resolve the element through contentLocation and measure it.

    scrollsY: boolean

    Whether this element is a vertical scroll container — its computed overflow-y is auto or scroll.

    This describes the element's overflow configuration, not whether it can be scrolled right now. A consumer needing live scroll state must resolve the element through contentLocation and measure it.

    Methods