Files
flights_web_raw/node_modules/@angular/cdk/drag-drop/parent-position-tracker.d.ts
T

32 lines
1.1 KiB
TypeScript
Executable File

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { ViewportRuler } from '@angular/cdk/scrolling';
/** Object holding the scroll position of something. */
interface ScrollPosition {
top: number;
left: number;
}
/** Keeps track of the scroll position and dimensions of the parents of an element. */
export declare class ParentPositionTracker {
private _document;
private _viewportRuler;
/** Cached positions of the scrollable parent elements. */
readonly positions: Map<HTMLElement | Document, {
scrollPosition: ScrollPosition;
clientRect?: ClientRect | undefined;
}>;
constructor(_document: Document, _viewportRuler: ViewportRuler);
/** Clears the cached positions. */
clear(): void;
/** Caches the positions. Should be called at the beginning of a drag sequence. */
cache(elements: readonly HTMLElement[]): void;
/** Handles scrolling while a drag is taking place. */
handleScroll(event: Event): ScrollPosition | null;
}
export {};