@nova-ui/bits
Version:
SolarWinds Nova Framework
33 lines (32 loc) • 1.36 kB
TypeScript
import { DomUtilService } from "./dom-util.service";
import { LoggerService } from "./log-service";
import { IEdgeDetectionResult } from "./public-api";
import * as i0 from "@angular/core";
/**
* <example-url>./../examples/index.html#/common/edge-detection-service</example-url>
*/
/**
* @dynamic
* @ignore
* Service that helps to calculate free space for dynamic elements (popover, dropdown, etc.) and define the best
* direction to show them. There are two ways how detection can be made:
* 1) default one - detection is made within viewport area.
* 2) custom container can be used for detection. Identify such container using 'nui-edge-definer' CSS-class.
*
* __Name :__
* Edge Detection Service
*/
export declare class EdgeDetectionService {
private domUtilService;
private document;
private logger;
edgeDefinerSelector: string;
initialEdgeDetectionResult: IEdgeDetectionResult;
constructor(domUtilService: DomUtilService, document: Document, logger: LoggerService);
canBe: (basePoint: HTMLElement, placed: HTMLElement, edgeDefinerElement?: Element) => IEdgeDetectionResult | undefined;
private outer;
private offset;
private getEdgeDefinerMeasurements;
static ɵfac: i0.ɵɵFactoryDeclaration<EdgeDetectionService, never>;
static ɵprov: i0.ɵɵInjectableDeclaration<EdgeDetectionService>;
}