ng-tailwind 2.24.327 → 2.24.328

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1767,6 +1767,8 @@
1767
1767
  this.name = uuid();
1768
1768
  this.isYPositionReversed = false;
1769
1769
  this.isXPositionReversed = false;
1770
+ this.isBindingYPosition = true;
1771
+ this.isBindingXPosition = true;
1770
1772
  this.subscriptions = [];
1771
1773
  if (this.ngtDropdownContainer) {
1772
1774
  this.subscriptions.push(this.ngtDropdownContainer.onActiveDropdownChange.subscribe(function (activeDropdown) {
@@ -1836,25 +1838,27 @@
1836
1838
  if (this.isOpen) {
1837
1839
  this.bindContainerXPosition();
1838
1840
  this.isXPositionReversed = !(this.containerXPosition > document.documentElement.clientWidth);
1839
- return this.isXPositionReversed;
1841
+ return !this.isBindingXPosition && this.isXPositionReversed;
1840
1842
  }
1841
1843
  };
1842
1844
  NgtDropdownComponent.prototype.shouldReverseYPosition = function () {
1843
1845
  if (!this.autoYReverse || this.reverseYPosition !== undefined) {
1844
1846
  return this.reverseYPosition;
1845
1847
  }
1846
- this.bindContainerYPosition();
1847
1848
  if (this.isOpen) {
1849
+ this.bindContainerYPosition();
1848
1850
  this.isYPositionReversed = this.containerYPosition > (document.documentElement.clientHeight * 0.9);
1849
- return this.isYPositionReversed;
1851
+ return !this.isBindingYPosition && this.isYPositionReversed;
1850
1852
  }
1851
1853
  };
1852
1854
  NgtDropdownComponent.prototype.bindContainerXPosition = function () {
1853
1855
  var _this = this;
1854
1856
  if (!this.containerXPosition && this.containerRef.nativeElement.offsetWidth) {
1857
+ this.isBindingXPosition = true;
1855
1858
  setTimeout(function () {
1856
1859
  _this.containerXPosition = _this.containerRef.nativeElement.getBoundingClientRect().x
1857
1860
  + _this.containerRef.nativeElement.offsetWidth;
1861
+ _this.isBindingXPosition = false;
1858
1862
  });
1859
1863
  }
1860
1864
  };
@@ -1862,9 +1866,11 @@
1862
1866
  var _this = this;
1863
1867
  var _a;
1864
1868
  if (!this.containerYPosition && ((_a = this.containerRef) === null || _a === void 0 ? void 0 : _a.nativeElement.offsetHeight)) {
1869
+ this.isBindingYPosition = true;
1865
1870
  setTimeout(function () {
1866
1871
  _this.containerYPosition = _this.containerRef.nativeElement.getBoundingClientRect().y
1867
1872
  + _this.containerRef.nativeElement.offsetHeight;
1873
+ _this.isBindingYPosition = false;
1868
1874
  });
1869
1875
  }
1870
1876
  };