UNPKG

jodit

Version:

Jodit is an awesome and useful wysiwyg editor with filebrowser

22 lines (21 loc) 967 B
/*! * Jodit Editor (https://xdsoft.net/jodit/) * Released under MIT see LICENSE.txt in the project root for license information. * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net */ /** * @module helpers/size */ import type { IPoint } from "../../../types/index"; /** * Returns the viewport offset of the containing block of a `position: fixed` * descendant of `elm`. A fixed element is normally positioned relative to the * viewport, but an ancestor with `transform`, `filter`, `perspective`, etc. * establishes a new containing block, shifting the fixed element by that * ancestor's top-left corner. The returned offset should be subtracted from * the desired viewport coordinates before applying them. * * Returns `{ x: 0, y: 0 }` when no such ancestor exists (the common case), so * call sites keep their previous behaviour unchanged. */ export declare function getFixedPositionOffset(elm: HTMLElement): IPoint;