ng-virtual-list 16.11.2 → 16.11.4

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.
@@ -7180,19 +7180,10 @@ class NgVirtualListComponent extends DisposableComponent {
7180
7180
  const scrollHandler = (userAction = false) => {
7181
7181
  const scroller = this._scrollerComponent;
7182
7182
  if (!!scroller) {
7183
- const isVertical = this._isVertical, bounds = this._$bounds.getValue(), listBounds = this._$listBounds.getValue(), scrollSize = (isVertical ? scroller.scrollTop : scroller.scrollLeft), maxScrollSize = isVertical ? (listBounds?.height ?? 0) - (bounds?.height ?? 0) : (listBounds?.width ?? 0) - (bounds?.width ?? 0), actualScrollSize = scrollSize;
7183
+ const isVertical = this._isVertical, scrollSize = (isVertical ? scroller.scrollTop : scroller.scrollLeft), actualScrollSize = scrollSize;
7184
7184
  if (this._readyForShow) {
7185
7185
  if (userAction) {
7186
- if (this._trackBox.isSnappedToStart) {
7187
- if (scrollSize > MIN_PIXELS_FOR_PREVENT_SNAPPING) {
7188
- this._$preventScrollSnapping.next(true);
7189
- }
7190
- }
7191
- if (this._trackBox.isSnappedToEnd) {
7192
- if (scrollSize < (maxScrollSize - MIN_PIXELS_FOR_PREVENT_SNAPPING)) {
7193
- this._$preventScrollSnapping.next(true);
7194
- }
7195
- }
7186
+ this._$preventScrollSnapping.next(true);
7196
7187
  }
7197
7188
  }
7198
7189
  this._$scrollSize.next(actualScrollSize);
@@ -7738,7 +7729,7 @@ class NgVirtualListComponent extends DisposableComponent {
7738
7729
  }
7739
7730
  if (!!this._snappedDisplayComponents) {
7740
7731
  while (this._snappedDisplayComponents.length > 0) {
7741
- const comp = this._displayComponents.shift();
7732
+ const comp = this._snappedDisplayComponents.shift();
7742
7733
  comp?.destroy();
7743
7734
  }
7744
7735
  }