ng-virtual-list 19.9.4 → 19.9.5
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.
|
@@ -599,7 +599,6 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
599
599
|
config = signal({});
|
|
600
600
|
measures = signal(undefined);
|
|
601
601
|
focused = signal(false);
|
|
602
|
-
reseted = signal(false);
|
|
603
602
|
part = signal(PART_DEFAULT_ITEM);
|
|
604
603
|
maxClickDistance = signal(DEFAULT_CLICK_DISTANCE);
|
|
605
604
|
data = signal(undefined);
|
|
@@ -683,7 +682,10 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
683
682
|
})).subscribe();
|
|
684
683
|
this.classes = computed(() => {
|
|
685
684
|
const data = this.data(), focused = this.focused();
|
|
686
|
-
return {
|
|
685
|
+
return {
|
|
686
|
+
[CLASS_NAME_SNAPPED]: data?.config?.snapped ?? false, [CLASS_NAME_SNAPPED_OUT]: data?.config?.snappedOut ?? false,
|
|
687
|
+
[CLASS_NAME_FOCUS]: focused,
|
|
688
|
+
};
|
|
687
689
|
});
|
|
688
690
|
this.index = computed(() => {
|
|
689
691
|
return this.config()?.tabIndex ?? -1;
|
|
@@ -692,7 +694,7 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
692
694
|
const data = this.data(), measures = this.measures(), config = this.config();
|
|
693
695
|
return {
|
|
694
696
|
data: data?.data, prevData: data?.previouseData, nextData: data?.nextData, measures,
|
|
695
|
-
config, reseted:
|
|
697
|
+
config, reseted: false, index: data?.index ?? -1
|
|
696
698
|
};
|
|
697
699
|
});
|
|
698
700
|
const $data = toObservable(this.data), $focused = toObservable(this.focused);
|
|
@@ -874,7 +876,6 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
874
876
|
return { width: width > 0 ? width : 1, height: height > 0 ? height : 1, };
|
|
875
877
|
}
|
|
876
878
|
show() {
|
|
877
|
-
this.reseted.set(false);
|
|
878
879
|
const el = this._elementRef.nativeElement, styles = el.style;
|
|
879
880
|
styles.zIndex = this._data?.config?.zIndex ?? DEFAULT_ZINDEX;
|
|
880
881
|
if (this.regular) {
|
|
@@ -891,7 +892,6 @@ class NgVirtualListItemComponent extends BaseVirtualListItemComponent {
|
|
|
891
892
|
}
|
|
892
893
|
}
|
|
893
894
|
hide() {
|
|
894
|
-
this.reseted.set(true);
|
|
895
895
|
const el = this._elementRef.nativeElement, styles = el.style;
|
|
896
896
|
styles.position = POSITION_ABSOLUTE;
|
|
897
897
|
styles.transform = `${TRANSLATE_3D$1}(${this._data?.config?.isVertical ? 0 : ZEROS_POSITION},${this._data?.config?.isVertical ? 0 : ZEROS_POSITION},0)`;
|
|
@@ -1902,7 +1902,7 @@ class TrackBox extends CacheMap {
|
|
|
1902
1902
|
* Calculates list metrics
|
|
1903
1903
|
*/
|
|
1904
1904
|
recalculateMetrics(options) {
|
|
1905
|
-
const { fromItemId, bounds, collection, dynamicSize, isVertical, itemSize,
|
|
1905
|
+
const { fromItemId, bounds, collection, dynamicSize, isVertical, itemSize, bufferSize: minBufferSize, scrollSize, snap, itemConfigMap, enabledBufferOptimization, previousTotalSize, crudDetected, deletedItemsMap } = options, roundedScrollSize = Math.round(scrollSize);
|
|
1906
1906
|
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)
|
|
1907
1907
|
|| (typeof fromItemId === 'string' && fromItemId > '-1');
|
|
1908
1908
|
let leftItemsOffset = 0, rightItemsOffset = 0;
|
|
@@ -2173,7 +2173,6 @@ class TrackBox extends CacheMap {
|
|
|
2173
2173
|
totalSize,
|
|
2174
2174
|
typicalItemSize,
|
|
2175
2175
|
isFromItemIdFound,
|
|
2176
|
-
reversed: options.reversed,
|
|
2177
2176
|
isUpdating,
|
|
2178
2177
|
};
|
|
2179
2178
|
return metrics;
|
|
@@ -2191,7 +2190,7 @@ class TrackBox extends CacheMap {
|
|
|
2191
2190
|
this.bumpVersion();
|
|
2192
2191
|
}
|
|
2193
2192
|
generateDisplayCollection(items, itemConfigMap, metrics) {
|
|
2194
|
-
const { offsetY, offsetX, width, height, normalizedItemWidth, normalizedItemHeight, dynamicSize, itemsOnDisplayLength, itemsFromStartToScrollEnd, isVertical, renderItems: renderItemsLength, scrollSize, sizeProperty, snap, snippedPos, startPosition, totalLength, startIndex, typicalItemSize,
|
|
2193
|
+
const { offsetY, offsetX, width, height, normalizedItemWidth, normalizedItemHeight, dynamicSize, itemsOnDisplayLength, itemsFromStartToScrollEnd, isVertical, renderItems: renderItemsLength, scrollSize, sizeProperty, snap, snippedPos, startPosition, totalLength, startIndex, typicalItemSize, } = metrics, displayItems = [];
|
|
2195
2194
|
if (items.length) {
|
|
2196
2195
|
const trackBy = this._trackingPropertyName, actualSnippedPosition = snippedPos, isSnappingMethodAdvanced = this.isSnappingMethodAdvanced, boundsSize = isVertical ? height : width, actualEndSnippedPosition = scrollSize + boundsSize - this._scrollEndOffset, positionOffset = isVertical ? offsetY : offsetX;
|
|
2197
2196
|
let pos = startPosition, renderItems = renderItemsLength, stickyItem, nextSticky, stickyItemIndex = -1, stickyItemSize = 0, endStickyItem, nextEndSticky, endStickyItemIndex = -1, endStickyItemSize = 0, count = 1;
|
|
@@ -2307,7 +2306,7 @@ class TrackBox extends CacheMap {
|
|
|
2307
2306
|
if (iterations > totalLength || i >= totalLength) {
|
|
2308
2307
|
break;
|
|
2309
2308
|
}
|
|
2310
|
-
const collectionItem = items[
|
|
2309
|
+
const collectionItem = items[i];
|
|
2311
2310
|
if (!collectionItem) {
|
|
2312
2311
|
continue;
|
|
2313
2312
|
}
|
|
@@ -3663,11 +3662,11 @@ class NgScrollerComponent {
|
|
|
3663
3662
|
}
|
|
3664
3663
|
}
|
|
3665
3664
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: NgScrollerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3666
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.19", type: NgScrollerComponent, isStandalone: true, 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
|
|
3665
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.19", type: NgScrollerComponent, isStandalone: true, 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: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: CdkScrollable, selector: "[cdk-scrollable], [cdkScrollable]" }, { kind: "directive", type: LocaleSensitiveDirective, selector: "[localeSensitive]", inputs: ["langTextDir", "listDir"] }, { kind: "component", type: NgScrollBarComponent, selector: "ng-scroll-bar", inputs: ["loading", "isVertical", "position", "thumbGradientPositions", "size", "theme", "prepared", "show"], outputs: ["onDrag"] }] });
|
|
3667
3666
|
}
|
|
3668
3667
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.19", ngImport: i0, type: NgScrollerComponent, decorators: [{
|
|
3669
3668
|
type: Component,
|
|
3670
|
-
args: [{ selector: 'ng-scroller', imports: [CommonModule, CdkScrollable, LocaleSensitiveDirective, NgScrollBarComponent], 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
|
|
3669
|
+
args: [{ selector: 'ng-scroller', imports: [CommonModule, CdkScrollable, LocaleSensitiveDirective, NgScrollBarComponent], 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"] }]
|
|
3671
3670
|
}], ctorParameters: () => [], propDecorators: { cdkScrollable: [{
|
|
3672
3671
|
type: ViewChild,
|
|
3673
3672
|
args: ['scrollViewport', { read: CdkScrollable }]
|
|
@@ -4516,27 +4515,27 @@ class NgVirtualListComponent {
|
|
|
4516
4515
|
});
|
|
4517
4516
|
let prepared = false, readyToStart = false, isUserScrolling = false;
|
|
4518
4517
|
this.$prepared.pipe(takeUntilDestroyed(), distinctUntilChanged(), tap(v => {
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4518
|
+
if (!v) {
|
|
4519
|
+
this.cacheClean();
|
|
4520
|
+
readyToStart = isUserScrolling = false;
|
|
4521
|
+
prepared = readyToStart = v;
|
|
4522
|
+
const waitForPreparation = this.waitForPreparation();
|
|
4523
|
+
if (waitForPreparation) {
|
|
4523
4524
|
const scrollerComponent = this._scrollerComponent();
|
|
4524
4525
|
if (scrollerComponent) {
|
|
4525
4526
|
scrollerComponent.prepared = v;
|
|
4526
4527
|
}
|
|
4527
4528
|
this.classes.set({ prepared: v, [WAIT_FOR_PREPARATION]: waitForPreparation });
|
|
4528
|
-
this.cacheClean();
|
|
4529
4529
|
}
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4530
|
+
else {
|
|
4531
|
+
const scrollerComponent = this._scrollerComponent();
|
|
4532
|
+
if (scrollerComponent) {
|
|
4533
|
+
scrollerComponent.prepared = true;
|
|
4534
|
+
}
|
|
4535
|
+
this.classes.set({ prepared: true, [READY_TO_START]: true, [WAIT_FOR_PREPARATION]: waitForPreparation });
|
|
4536
4536
|
}
|
|
4537
|
-
this.classes.set({ prepared: true, [READY_TO_START]: true, [WAIT_FOR_PREPARATION]: waitForPreparation });
|
|
4538
4537
|
}
|
|
4539
|
-
}), filter$1(v => !!v),
|
|
4538
|
+
}), filter$1(v => !!v), delay(0), takeUntilDestroyed(this._destroyRef), tap(v => {
|
|
4540
4539
|
prepared = v;
|
|
4541
4540
|
}), delay(0), takeUntilDestroyed(this._destroyRef), tap(v => {
|
|
4542
4541
|
const waitForPreparation = this.waitForPreparation(), scrollerComponent = this._scrollerComponent(), val = v || !waitForPreparation;
|
|
@@ -4695,14 +4694,12 @@ class NgVirtualListComponent {
|
|
|
4695
4694
|
const { width, height, x, y } = bounds, viewportSize = (isVertical ? height : width);
|
|
4696
4695
|
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);
|
|
4697
4696
|
const opts = {
|
|
4698
|
-
bounds: { width, height, x, y }, dynamicSize, isVertical, itemSize,
|
|
4697
|
+
bounds: { width, height, x, y }, dynamicSize, isVertical, itemSize,
|
|
4699
4698
|
bufferSize, maxBufferSize, scrollSize: actualScrollSize, snap, enabledBufferOptimization,
|
|
4700
4699
|
};
|
|
4701
|
-
if (snapScrollToBottom &&
|
|
4702
|
-
const { totalSize: calculatedTotalSize } = this._trackBox.getMetrics(items, itemConfigMap, { ...opts, reversed: true });
|
|
4703
|
-
totalSize = calculatedTotalSize;
|
|
4700
|
+
if (snapScrollToBottom && !prepared) {
|
|
4704
4701
|
actualScrollSize = (totalSize > viewportSize ? totalSize - viewportSize : 0);
|
|
4705
|
-
const { displayItems: calculatedDisplayItems, totalSize: calculatedTotalSize1 } = this._trackBox.updateCollection(items, itemConfigMap, { ...opts,
|
|
4702
|
+
const { displayItems: calculatedDisplayItems, totalSize: calculatedTotalSize1 } = this._trackBox.updateCollection(items, itemConfigMap, { ...opts, scrollSize: actualScrollSize });
|
|
4706
4703
|
displayItems = calculatedDisplayItems;
|
|
4707
4704
|
totalSize = calculatedTotalSize1;
|
|
4708
4705
|
scrollLength = Math.round(totalSize) ?? 0;
|
|
@@ -4907,7 +4904,7 @@ class NgVirtualListComponent {
|
|
|
4907
4904
|
if (dynamicSize) {
|
|
4908
4905
|
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 = {
|
|
4909
4906
|
bounds: { width, height, x, y }, collection: items, dynamicSize, isVertical: this._isVertical, itemSize,
|
|
4910
|
-
bufferSize: this.bufferSize(), maxBufferSize: this.maxBufferSize(),
|
|
4907
|
+
bufferSize: this.bufferSize(), maxBufferSize: this.maxBufferSize(),
|
|
4911
4908
|
scrollSize: (isVertical ? scrollerComponent.scrollTop : scrollerComponent.scrollLeft) + delta,
|
|
4912
4909
|
snap: this.snap(), fromItemId: id, enabledBufferOptimization: this.enabledBufferOptimization(),
|
|
4913
4910
|
}, scrollSize = this._trackBox.getItemPosition(id, itemConfigMap, opts), params = {
|
|
@@ -5207,6 +5204,7 @@ class NgVirtualListComponent {
|
|
|
5207
5204
|
if (scrollerComponent) {
|
|
5208
5205
|
scrollerComponent.reset();
|
|
5209
5206
|
}
|
|
5207
|
+
this._$prepared.next(false);
|
|
5210
5208
|
}
|
|
5211
5209
|
stopSnappingScrollToEnd() {
|
|
5212
5210
|
const scroller = this._scrollerComponent();
|