@skyux/core
Version:
This library was generated with [Nx](https://nx.dev).
41 lines (40 loc) • 1.53 kB
TypeScript
import { ViewportRuler } from '@angular/cdk/overlay';
import { NgZone, Renderer2 } from '@angular/core';
import { Observable } from 'rxjs';
import { SkyAffixConfig } from './affix-config';
import { SkyAffixOffsetChange } from './affix-offset-change';
import { SkyAffixPlacementChange } from './affix-placement-change';
export declare class SkyAffixer {
#private;
/**
* Fires when the affixed element's offset changes.
*/
get offsetChange(): Observable<SkyAffixOffsetChange>;
/**
* Fires when the base element's nearest overflow parent is scrolling. This is useful if you need
* to perform an additional action during the scroll event but don't want to generate another
* event listener.
*/
get overflowScroll(): Observable<void>;
/**
* Fires when the placement value changes. A `null` value indicates that a suitable
* placement could not be found.
*/
get placementChange(): Observable<SkyAffixPlacementChange>;
constructor(affixedElement: HTMLElement, renderer: Renderer2, viewportRuler: ViewportRuler, zone: NgZone, layoutViewport: HTMLElement);
/**
* Affixes an element to a base element.
* @param baseElement The base element.
* @param config Configuration for the affix action.
*/
affixTo(baseElement: HTMLElement, config?: SkyAffixConfig): void;
getConfig(): SkyAffixConfig;
/**
* Re-runs the affix calculation.
*/
reaffix(): void;
/**
* Destroys the affixer.
*/
destroy(): void;
}