ng-virtual-list 18.9.2 → 18.9.3
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.
- package/esm2022/lib/components/list-item/ng-virtual-list-item.component.mjs +2 -5
- package/esm2022/lib/components/scroller/ng-scroller.component.mjs +2 -2
- package/esm2022/lib/models/index.mjs +1 -1
- package/esm2022/lib/ng-virtual-list.component.mjs +19 -21
- package/esm2022/lib/utils/track-box.mjs +4 -5
- package/fesm2022/ng-virtual-list.mjs +24 -30
- package/fesm2022/ng-virtual-list.mjs.map +1 -1
- package/lib/components/list-item/ng-virtual-list-item.component.d.ts +0 -1
- package/lib/models/index.d.ts +3 -1
- package/lib/utils/track-box.d.ts +0 -2
- package/package.json +1 -1
|
@@ -600,7 +600,6 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
600
600
|
config = signal({});
|
|
601
601
|
measures = signal(undefined);
|
|
602
602
|
focused = signal(false);
|
|
603
|
-
reseted = signal(false);
|
|
604
603
|
part = signal(PART_DEFAULT_ITEM);
|
|
605
604
|
maxClickDistance = signal(DEFAULT_CLICK_DISTANCE);
|
|
606
605
|
data = signal(undefined);
|
|
@@ -695,7 +694,7 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
695
694
|
const data = this.data(), measures = this.measures(), config = this.config();
|
|
696
695
|
return {
|
|
697
696
|
data: data?.data, prevData: data?.previouseData, nextData: data?.nextData, measures,
|
|
698
|
-
config, reseted:
|
|
697
|
+
config, reseted: false, index: data?.index ?? -1
|
|
699
698
|
};
|
|
700
699
|
});
|
|
701
700
|
const $data = toObservable(this.data), $focused = toObservable(this.focused);
|
|
@@ -878,7 +877,6 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
878
877
|
return { width: width > 0 ? width : 1, height: height > 0 ? height : 1, };
|
|
879
878
|
}
|
|
880
879
|
show() {
|
|
881
|
-
this.reseted.set(false);
|
|
882
880
|
const el = this._elementRef.nativeElement, styles = el.style;
|
|
883
881
|
styles.zIndex = this._data?.config?.zIndex ?? DEFAULT_ZINDEX;
|
|
884
882
|
if (this.regular) {
|
|
@@ -895,7 +893,6 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
895
893
|
}
|
|
896
894
|
}
|
|
897
895
|
hide() {
|
|
898
|
-
this.reseted.set(true);
|
|
899
896
|
const el = this._elementRef.nativeElement, styles = el.style;
|
|
900
897
|
styles.position = POSITION_ABSOLUTE;
|
|
901
898
|
styles.transform = `${TRANSLATE_3D$1}(${this._data?.config?.isVertical ? 0 : ZEROS_POSITION},${this._data?.config?.isVertical ? 0 : ZEROS_POSITION},0)`;
|
|
@@ -1906,7 +1903,7 @@ class TrackBox extends CacheMap {
|
|
|
1906
1903
|
* Calculates list metrics
|
|
1907
1904
|
*/
|
|
1908
1905
|
recalculateMetrics(options) {
|
|
1909
|
-
const { fromItemId, bounds, collection, dynamicSize, isVertical, itemSize,
|
|
1906
|
+
const { fromItemId, bounds, collection, dynamicSize, isVertical, itemSize, bufferSize: minBufferSize, scrollSize, snap, itemConfigMap, enabledBufferOptimization, previousTotalSize, crudDetected, deletedItemsMap } = options, roundedScrollSize = Math.round(scrollSize);
|
|
1910
1907
|
const trackBy = this._trackingPropertyName, bufferSize = Math.max(minBufferSize, this._bufferSize), { width, height } = bounds, sizeProperty = isVertical ? HEIGHT_PROP_NAME : WIDTH_PROP_NAME, size = isVertical ? height : width, totalLength = collection.length, typicalItemSize = itemSize, w = isVertical ? width : typicalItemSize, h = isVertical ? typicalItemSize : height, map = this._map, snapshot = this._snapshot, checkOverscrollItemsLimit = Math.ceil(typicalItemSize !== 0 ? size / typicalItemSize : 0), snippedPos = Math.floor(scrollSize) + this._scrollStartOffset, leftItemsWeights = [], isFromId = fromItemId !== undefined && (typeof fromItemId === 'number' && fromItemId > -1)
|
|
1911
1908
|
|| (typeof fromItemId === 'string' && fromItemId > '-1');
|
|
1912
1909
|
let leftItemsOffset = 0, rightItemsOffset = 0;
|
|
@@ -2177,7 +2174,6 @@ class TrackBox extends CacheMap {
|
|
|
2177
2174
|
totalSize,
|
|
2178
2175
|
typicalItemSize,
|
|
2179
2176
|
isFromItemIdFound,
|
|
2180
|
-
reversed: options.reversed,
|
|
2181
2177
|
isUpdating,
|
|
2182
2178
|
};
|
|
2183
2179
|
return metrics;
|
|
@@ -2195,7 +2191,7 @@ class TrackBox extends CacheMap {
|
|
|
2195
2191
|
this.bumpVersion();
|
|
2196
2192
|
}
|
|
2197
2193
|
generateDisplayCollection(items, itemConfigMap, metrics) {
|
|
2198
|
-
const { offsetY, offsetX, width, height, normalizedItemWidth, normalizedItemHeight, dynamicSize, itemsOnDisplayLength, itemsFromStartToScrollEnd, isVertical, renderItems: renderItemsLength, scrollSize, sizeProperty, snap, snippedPos, startPosition, totalLength, startIndex, typicalItemSize,
|
|
2194
|
+
const { offsetY, offsetX, width, height, normalizedItemWidth, normalizedItemHeight, dynamicSize, itemsOnDisplayLength, itemsFromStartToScrollEnd, isVertical, renderItems: renderItemsLength, scrollSize, sizeProperty, snap, snippedPos, startPosition, totalLength, startIndex, typicalItemSize, } = metrics, displayItems = [];
|
|
2199
2195
|
if (items.length) {
|
|
2200
2196
|
const trackBy = this._trackingPropertyName, actualSnippedPosition = snippedPos, isSnappingMethodAdvanced = this.isSnappingMethodAdvanced, boundsSize = isVertical ? height : width, actualEndSnippedPosition = scrollSize + boundsSize - this._scrollEndOffset, positionOffset = isVertical ? offsetY : offsetX;
|
|
2201
2197
|
let pos = startPosition, renderItems = renderItemsLength, stickyItem, nextSticky, stickyItemIndex = -1, stickyItemSize = 0, endStickyItem, nextEndSticky, endStickyItemIndex = -1, endStickyItemSize = 0, count = 1;
|
|
@@ -2311,7 +2307,7 @@ class TrackBox extends CacheMap {
|
|
|
2311
2307
|
if (iterations > totalLength || i >= totalLength) {
|
|
2312
2308
|
break;
|
|
2313
2309
|
}
|
|
2314
|
-
const collectionItem = items[
|
|
2310
|
+
const collectionItem = items[i];
|
|
2315
2311
|
if (!collectionItem) {
|
|
2316
2312
|
continue;
|
|
2317
2313
|
}
|
|
@@ -3665,11 +3661,11 @@ class NgScrollerComponent {
|
|
|
3665
3661
|
}
|
|
3666
3662
|
}
|
|
3667
3663
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgScrollerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3668
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.14", type: NgScrollerComponent, selector: "ng-scroller", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, focusedElement: { classPropertyName: "focusedElement", publicName: "focusedElement", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null }, startOffset: { classPropertyName: "startOffset", publicName: "startOffset", isSignal: true, isRequired: false, transformFunction: null }, endOffset: { classPropertyName: "endOffset", publicName: "endOffset", isSignal: true, isRequired: false, transformFunction: null }, scrollbarTheme: { classPropertyName: "scrollbarTheme", publicName: "scrollbarTheme", isSignal: true, isRequired: false, transformFunction: null }, scrollbarMinSize: { classPropertyName: "scrollbarMinSize", publicName: "scrollbarMinSize", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "scrollContent", first: true, predicate: ["scrollContent"], descendants: true, isSignal: true }, { propertyName: "scrollViewport", first: true, predicate: ["scrollViewport"], descendants: true, isSignal: true }, { propertyName: "cdkScrollable", first: true, predicate: ["scrollViewport"], descendants: true, read: CdkScrollable }, { propertyName: "scrollBar", first: true, predicate: ["scrollBar"], descendants: true, read: NgScrollBarComponent }], ngImport: i0, template: "<div localeSensitive [langTextDir]=\"langTextDir()\" [listDir]=\"direction()\" class=\"ngvl__container\" [ngClass]=\"containerClasses()\">\r\n <div #scrollViewport cdkScrollable part=\"scroller\" class=\"ngvl__scroller\">\r\n <div #scrollContent [attr.aria-orientation]=\"direction()\" [attr.aria-activedescendant]=\"focusedElement()\"\r\n tabindex=\"0\" part=\"list\" class=\"ngvl__list\" [ngClass]=\"actualClasses()\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <ng-scroll-bar #scrollBar [isVertical]=\"isVertical()\" [size]=\"thumbSize()\" [theme]=\"scrollbarTheme()\" [position]=\"thumbPosition()\"\r\n [thumbGradientPositions]=\"thumbGradientPositions()\" [loading]=\"loading()\" [prepared]=\"preparedSignal()\" [show]=\"thumbShow()\"\r\n (onDrag)=\"onScrollBarDragHandler($event)\"></ng-scroll-bar>\r\n</div>", styles: [":host{position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ngvl__container{position:relative;overflow:hidden;display:grid;width:100%;height:100%;cursor:grab}.ngvl__container.grabbing{cursor:grabbing}.ngvl__container.horizontal{grid-template-rows:1fr auto}.ngvl__container.horizontal .ngvl__list{display:inline-flex}.ngvl__container.horizontal .ngvl__scroller{overflow:hidden}.ngvl__container.vertical{grid-template-columns:1fr auto}.ngvl__container.vertical .ngvl__scroller{overflow:hidden}.ngvl__scroller{display:block;position:relative;overflow:hidden;width:100%;height:100%}.ngvl__list{position:absolute;list-style:none;padding:0;margin:0;width:100%;height:100
|
|
3664
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "18.2.14", type: NgScrollerComponent, selector: "ng-scroller", inputs: { direction: { classPropertyName: "direction", publicName: "direction", isSignal: true, isRequired: false, transformFunction: null }, focusedElement: { classPropertyName: "focusedElement", publicName: "focusedElement", isSignal: true, isRequired: false, transformFunction: null }, content: { classPropertyName: "content", publicName: "content", isSignal: true, isRequired: false, transformFunction: null }, loading: { classPropertyName: "loading", publicName: "loading", isSignal: true, isRequired: false, transformFunction: null }, classes: { classPropertyName: "classes", publicName: "classes", isSignal: true, isRequired: false, transformFunction: null }, startOffset: { classPropertyName: "startOffset", publicName: "startOffset", isSignal: true, isRequired: false, transformFunction: null }, endOffset: { classPropertyName: "endOffset", publicName: "endOffset", isSignal: true, isRequired: false, transformFunction: null }, scrollbarTheme: { classPropertyName: "scrollbarTheme", publicName: "scrollbarTheme", isSignal: true, isRequired: false, transformFunction: null }, scrollbarMinSize: { classPropertyName: "scrollbarMinSize", publicName: "scrollbarMinSize", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "scrollContent", first: true, predicate: ["scrollContent"], descendants: true, isSignal: true }, { propertyName: "scrollViewport", first: true, predicate: ["scrollViewport"], descendants: true, isSignal: true }, { propertyName: "cdkScrollable", first: true, predicate: ["scrollViewport"], descendants: true, read: CdkScrollable }, { propertyName: "scrollBar", first: true, predicate: ["scrollBar"], descendants: true, read: NgScrollBarComponent }], ngImport: i0, template: "<div localeSensitive [langTextDir]=\"langTextDir()\" [listDir]=\"direction()\" class=\"ngvl__container\" [ngClass]=\"containerClasses()\">\r\n <div #scrollViewport cdkScrollable part=\"scroller\" class=\"ngvl__scroller\">\r\n <div #scrollContent [attr.aria-orientation]=\"direction()\" [attr.aria-activedescendant]=\"focusedElement()\"\r\n tabindex=\"0\" part=\"list\" class=\"ngvl__list\" [ngClass]=\"actualClasses()\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <ng-scroll-bar #scrollBar [isVertical]=\"isVertical()\" [size]=\"thumbSize()\" [theme]=\"scrollbarTheme()\" [position]=\"thumbPosition()\"\r\n [thumbGradientPositions]=\"thumbGradientPositions()\" [loading]=\"loading()\" [prepared]=\"preparedSignal()\" [show]=\"thumbShow()\"\r\n (onDrag)=\"onScrollBarDragHandler($event)\"></ng-scroll-bar>\r\n</div>", styles: [":host{position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ngvl__container{position:relative;overflow:hidden;display:grid;width:100%;height:100%;cursor:grab}.ngvl__container.grabbing{cursor:grabbing}.ngvl__container.horizontal{grid-template-rows:1fr auto}.ngvl__container.horizontal .ngvl__list{display:inline-flex}.ngvl__container.horizontal .ngvl__scroller{overflow:hidden}.ngvl__container.vertical{grid-template-columns:1fr auto}.ngvl__container.vertical .ngvl__scroller{overflow:hidden}.ngvl__scroller{display:block;position:relative;overflow:hidden;width:100%;height:100%}.ngvl__list{position:absolute;list-style:none;padding:0;margin:0;width:100%;height:100%}.ngvl__list.prepared{overflow:hidden}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: NgScrollBarComponent, selector: "ng-scroll-bar", inputs: ["loading", "isVertical", "position", "thumbGradientPositions", "size", "theme", "prepared", "show"], outputs: ["onDrag"] }, { kind: "directive", type: LocaleSensitiveDirective, selector: "[localeSensitive]", inputs: ["langTextDir", "listDir"] }] });
|
|
3669
3665
|
}
|
|
3670
3666
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NgScrollerComponent, decorators: [{
|
|
3671
3667
|
type: Component,
|
|
3672
|
-
args: [{ selector: 'ng-scroller', standalone: false, template: "<div localeSensitive [langTextDir]=\"langTextDir()\" [listDir]=\"direction()\" class=\"ngvl__container\" [ngClass]=\"containerClasses()\">\r\n <div #scrollViewport cdkScrollable part=\"scroller\" class=\"ngvl__scroller\">\r\n <div #scrollContent [attr.aria-orientation]=\"direction()\" [attr.aria-activedescendant]=\"focusedElement()\"\r\n tabindex=\"0\" part=\"list\" class=\"ngvl__list\" [ngClass]=\"actualClasses()\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <ng-scroll-bar #scrollBar [isVertical]=\"isVertical()\" [size]=\"thumbSize()\" [theme]=\"scrollbarTheme()\" [position]=\"thumbPosition()\"\r\n [thumbGradientPositions]=\"thumbGradientPositions()\" [loading]=\"loading()\" [prepared]=\"preparedSignal()\" [show]=\"thumbShow()\"\r\n (onDrag)=\"onScrollBarDragHandler($event)\"></ng-scroll-bar>\r\n</div>", styles: [":host{position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ngvl__container{position:relative;overflow:hidden;display:grid;width:100%;height:100%;cursor:grab}.ngvl__container.grabbing{cursor:grabbing}.ngvl__container.horizontal{grid-template-rows:1fr auto}.ngvl__container.horizontal .ngvl__list{display:inline-flex}.ngvl__container.horizontal .ngvl__scroller{overflow:hidden}.ngvl__container.vertical{grid-template-columns:1fr auto}.ngvl__container.vertical .ngvl__scroller{overflow:hidden}.ngvl__scroller{display:block;position:relative;overflow:hidden;width:100%;height:100%}.ngvl__list{position:absolute;list-style:none;padding:0;margin:0;width:100%;height:100
|
|
3668
|
+
args: [{ selector: 'ng-scroller', standalone: false, template: "<div localeSensitive [langTextDir]=\"langTextDir()\" [listDir]=\"direction()\" class=\"ngvl__container\" [ngClass]=\"containerClasses()\">\r\n <div #scrollViewport cdkScrollable part=\"scroller\" class=\"ngvl__scroller\">\r\n <div #scrollContent [attr.aria-orientation]=\"direction()\" [attr.aria-activedescendant]=\"focusedElement()\"\r\n tabindex=\"0\" part=\"list\" class=\"ngvl__list\" [ngClass]=\"actualClasses()\">\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n <ng-scroll-bar #scrollBar [isVertical]=\"isVertical()\" [size]=\"thumbSize()\" [theme]=\"scrollbarTheme()\" [position]=\"thumbPosition()\"\r\n [thumbGradientPositions]=\"thumbGradientPositions()\" [loading]=\"loading()\" [prepared]=\"preparedSignal()\" [show]=\"thumbShow()\"\r\n (onDrag)=\"onScrollBarDragHandler($event)\"></ng-scroll-bar>\r\n</div>", styles: [":host{position:relative;overflow:hidden;-webkit-user-select:none;user-select:none}.ngvl__container{position:relative;overflow:hidden;display:grid;width:100%;height:100%;cursor:grab}.ngvl__container.grabbing{cursor:grabbing}.ngvl__container.horizontal{grid-template-rows:1fr auto}.ngvl__container.horizontal .ngvl__list{display:inline-flex}.ngvl__container.horizontal .ngvl__scroller{overflow:hidden}.ngvl__container.vertical{grid-template-columns:1fr auto}.ngvl__container.vertical .ngvl__scroller{overflow:hidden}.ngvl__scroller{display:block;position:relative;overflow:hidden;width:100%;height:100%}.ngvl__list{position:absolute;list-style:none;padding:0;margin:0;width:100%;height:100%}.ngvl__list.prepared{overflow:hidden}\n"] }]
|
|
3673
3669
|
}], ctorParameters: () => [], propDecorators: { cdkScrollable: [{
|
|
3674
3670
|
type: ViewChild,
|
|
3675
3671
|
args: ['scrollViewport', { read: CdkScrollable }]
|
|
@@ -4518,27 +4514,27 @@ class NgVirtualListComponent {
|
|
|
4518
4514
|
});
|
|
4519
4515
|
let prepared = false, readyToStart = false, isUserScrolling = false;
|
|
4520
4516
|
this.$prepared.pipe(takeUntilDestroyed(), distinctUntilChanged(), tap(v => {
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4517
|
+
if (!v) {
|
|
4518
|
+
this.cacheClean();
|
|
4519
|
+
readyToStart = isUserScrolling = false;
|
|
4520
|
+
prepared = readyToStart = v;
|
|
4521
|
+
const waitForPreparation = this.waitForPreparation();
|
|
4522
|
+
if (waitForPreparation) {
|
|
4525
4523
|
const scrollerComponent = this._scrollerComponent();
|
|
4526
4524
|
if (scrollerComponent) {
|
|
4527
4525
|
scrollerComponent.prepared = v;
|
|
4528
4526
|
}
|
|
4529
4527
|
this.classes.set({ prepared: v, [WAIT_FOR_PREPARATION]: waitForPreparation });
|
|
4530
|
-
this.cacheClean();
|
|
4531
4528
|
}
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4537
|
-
|
|
4529
|
+
else {
|
|
4530
|
+
const scrollerComponent = this._scrollerComponent();
|
|
4531
|
+
if (scrollerComponent) {
|
|
4532
|
+
scrollerComponent.prepared = true;
|
|
4533
|
+
}
|
|
4534
|
+
this.classes.set({ prepared: true, [READY_TO_START]: true, [WAIT_FOR_PREPARATION]: waitForPreparation });
|
|
4538
4535
|
}
|
|
4539
|
-
this.classes.set({ prepared: true, [READY_TO_START]: true, [WAIT_FOR_PREPARATION]: waitForPreparation });
|
|
4540
4536
|
}
|
|
4541
|
-
}), filter$1(v => !!v),
|
|
4537
|
+
}), filter$1(v => !!v), delay(0), takeUntilDestroyed(this._destroyRef), tap(v => {
|
|
4542
4538
|
prepared = v;
|
|
4543
4539
|
}), delay(0), takeUntilDestroyed(this._destroyRef), tap(v => {
|
|
4544
4540
|
const waitForPreparation = this.waitForPreparation(), scrollerComponent = this._scrollerComponent(), val = v || !waitForPreparation;
|
|
@@ -4697,14 +4693,11 @@ class NgVirtualListComponent {
|
|
|
4697
4693
|
const { width, height, x, y } = bounds, viewportSize = (isVertical ? height : width);
|
|
4698
4694
|
let scrollLength = Math.round(this._totalSize()) ?? 0, actualScrollLength = Math.round(scrollLength === 0 ? 0 : scrollLength > viewportSize ? scrollLength - viewportSize : scrollLength), roundedMaxPosition = Math.round(actualScrollLength), scrollPosition = Math.round(actualScrollSize);
|
|
4699
4695
|
const opts = {
|
|
4700
|
-
bounds: { width, height, x, y }, dynamicSize, isVertical, itemSize,
|
|
4696
|
+
bounds: { width, height, x, y }, dynamicSize, isVertical, itemSize,
|
|
4701
4697
|
bufferSize, maxBufferSize, scrollSize: actualScrollSize, snap, enabledBufferOptimization,
|
|
4702
4698
|
};
|
|
4703
|
-
if (snapScrollToBottom &&
|
|
4704
|
-
const { totalSize:
|
|
4705
|
-
totalSize = calculatedTotalSize;
|
|
4706
|
-
actualScrollSize = (totalSize > viewportSize ? totalSize - viewportSize : 0);
|
|
4707
|
-
const { displayItems: calculatedDisplayItems, totalSize: calculatedTotalSize1 } = this._trackBox.updateCollection(items, itemConfigMap, { ...opts, reversed: true, scrollSize: actualScrollSize });
|
|
4699
|
+
if (snapScrollToBottom && !prepared) {
|
|
4700
|
+
const { displayItems: calculatedDisplayItems, totalSize: calculatedTotalSize1 } = this._trackBox.updateCollection(items, itemConfigMap, { ...opts, scrollSize: actualScrollSize });
|
|
4708
4701
|
displayItems = calculatedDisplayItems;
|
|
4709
4702
|
totalSize = calculatedTotalSize1;
|
|
4710
4703
|
scrollLength = Math.round(totalSize) ?? 0;
|
|
@@ -4909,7 +4902,7 @@ class NgVirtualListComponent {
|
|
|
4909
4902
|
if (dynamicSize) {
|
|
4910
4903
|
const { width, height, x, y } = this._bounds() || { x: 0, y: 0, width: DEFAULT_LIST_SIZE, height: DEFAULT_LIST_SIZE }, itemConfigMap = this.itemConfigMap(), items = this._actualItems(), isVertical = this._isVertical, currentScollSize = (isVertical ? scrollerComponent.scrollTop : scrollerComponent.scrollLeft), delta = this._trackBox.delta, opts = {
|
|
4911
4904
|
bounds: { width, height, x, y }, collection: items, dynamicSize, isVertical: this._isVertical, itemSize,
|
|
4912
|
-
bufferSize: this.bufferSize(), maxBufferSize: this.maxBufferSize(),
|
|
4905
|
+
bufferSize: this.bufferSize(), maxBufferSize: this.maxBufferSize(),
|
|
4913
4906
|
scrollSize: (isVertical ? scrollerComponent.scrollTop : scrollerComponent.scrollLeft) + delta,
|
|
4914
4907
|
snap: this.snap(), fromItemId: id, enabledBufferOptimization: this.enabledBufferOptimization(),
|
|
4915
4908
|
}, scrollSize = this._trackBox.getItemPosition(id, itemConfigMap, opts), params = {
|
|
@@ -5209,6 +5202,7 @@ class NgVirtualListComponent {
|
|
|
5209
5202
|
if (scrollerComponent) {
|
|
5210
5203
|
scrollerComponent.reset();
|
|
5211
5204
|
}
|
|
5205
|
+
this._$prepared.next(false);
|
|
5212
5206
|
}
|
|
5213
5207
|
stopSnappingScrollToEnd() {
|
|
5214
5208
|
const scroller = this._scrollerComponent();
|