@syncfusion/ej2-popups
Advanced tools
Comparing version 16.2.50 to 16.2.51
@@ -5,2 +5,10 @@ # Changelog | ||
### Popup library | ||
#### Bug Fixes | ||
- Popup can be created, even if the element is not available in DOM. | ||
## 16.2.49 (2018-08-21) | ||
### Spinner | ||
@@ -7,0 +15,0 @@ |
/*! | ||
* filename: index.d.ts | ||
* version : 16.2.50 | ||
* version : 16.2.51 | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license. |
{ | ||
"name": "@syncfusion/ej2-popups", | ||
"version": "16.2.50", | ||
"version": "16.2.51", | ||
"description": "Essential JS 2 popup Component", | ||
@@ -5,0 +5,0 @@ "author": "Syncfusion Inc.", |
@@ -205,2 +205,3 @@ import { ChildProperty } from '@syncfusion/ej2-base'; | ||
private reposition(); | ||
private checkGetBoundingClientRect(ele); | ||
private getAnchorPosition(anchorEle, ele, position, offsetX, offsetY); | ||
@@ -207,0 +208,0 @@ private callFlip(param); |
@@ -238,7 +238,7 @@ var __extends = (this && this.__extends) || (function () { | ||
Popup.prototype.isElementVisible = function (relateToElement, scrollElement) { | ||
var rect = relateToElement.getBoundingClientRect(); | ||
var rect = this.checkGetBoundingClientRect(relateToElement); | ||
if (!rect.height || !rect.width) { | ||
return false; | ||
} | ||
if (scrollElement.getBoundingClientRect) { | ||
if (!isNullOrUndefined(this.checkGetBoundingClientRect(scrollElement))) { | ||
var parent_4 = scrollElement.getBoundingClientRect(); | ||
@@ -330,8 +330,23 @@ return !(rect.bottom < parent_4.top) && | ||
} | ||
this.element.style.left = pos.left + 'px'; | ||
this.element.style.top = pos.top + 'px'; | ||
if (!isNullOrUndefined(pos)) { | ||
this.element.style.left = pos.left + 'px'; | ||
this.element.style.top = pos.top + 'px'; | ||
} | ||
}; | ||
Popup.prototype.checkGetBoundingClientRect = function (ele) { | ||
var eleRect; | ||
try { | ||
eleRect = ele.getBoundingClientRect(); | ||
return eleRect; | ||
} | ||
catch (error) { | ||
return null; | ||
} | ||
}; | ||
Popup.prototype.getAnchorPosition = function (anchorEle, ele, position, offsetX, offsetY) { | ||
var eleRect = ele.getBoundingClientRect(); | ||
var anchorRect = anchorEle.getBoundingClientRect(); | ||
var eleRect = this.checkGetBoundingClientRect(ele); | ||
var anchorRect = this.checkGetBoundingClientRect(anchorEle); | ||
if (isNullOrUndefined(eleRect) || isNullOrUndefined(anchorRect)) { | ||
return null; | ||
} | ||
var anchor = anchorEle; | ||
@@ -403,4 +418,7 @@ var anchorPos = { left: 0, top: 0 }; | ||
else { | ||
var elementRect = this.element.getBoundingClientRect(); | ||
var viewPortRect = this.viewPortElement.getBoundingClientRect(); | ||
var elementRect = this.checkGetBoundingClientRect(this.element); | ||
var viewPortRect = this.checkGetBoundingClientRect(this.viewPortElement); | ||
if (isNullOrUndefined(elementRect) || isNullOrUndefined(viewPortRect)) { | ||
return null; | ||
} | ||
if (param && param.Y === true) { | ||
@@ -407,0 +425,0 @@ if (viewPortRect.top > elementRect.top) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8587500
60797