Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
const option: PopupOptions = {
pos: this._elementRef,
posType: PopupPositionType.absolute,
posOffset: {
top: this._elementRef.nativeElement.offsetHeight
},
size: {width: Number(this._elementRef.nativeElement.offsetWidth)}
};
const popupInfo: PopupInfo = this._popupService.popup(this._contentTemplateRef, option);
this._popupElement = popupInfo.element;
this._disposePopup = () => {
popupInfo.dispose()
};
PopupService.setBackground(this._popupElement, this._render);
if (this._openTrigger === DropDownTrigger.mouseover && this._popupElement) {
this._removeMouseoverHandler = this._render.listen(this._popupElement, 'mouseover', () => {
if (this._timeout) {
clearTimeout(this._timeout);
this._timeout = null;
}
});
}
if (this._closeTrigger === DropDownTrigger.mouseout && this._popupElement) {
this._removeMouseoutHandler = this._render.listen(this._popupElement, 'mouseout', () => {
if (!this._timeout) {
this._timeout = setTimeout(() => {
this._closeDropDown();
}, 400);
}