@infinite-list/data-model
Advanced tools
Comparing version 0.1.1-recycle-alpha.9 to 0.1.1-recycle-alpha.10
@@ -19,3 +19,3 @@ import BaseLayout from './BaseLayout'; | ||
getIndexKey(index: number): string; | ||
getIndexKeyOffset(index: number): number; | ||
getIndexKeyOffset(index: number, exclusive?: boolean): number; | ||
getKeyItemOffset(key: string, exclusive?: boolean): number; | ||
@@ -22,0 +22,0 @@ createIntervalTree(): PrefixIntervalTree; |
{ | ||
"name": "@infinite-list/data-model", | ||
"version": "0.1.1-recycle-alpha.9", | ||
"version": "0.1.1-recycle-alpha.10", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "dist", |
@@ -68,5 +68,5 @@ import BaseLayout from './BaseLayout'; | ||
getIndexKeyOffset(index: number) { | ||
getIndexKeyOffset(index: number, exclusive?: boolean) { | ||
const key = this.getIndexKey(index); | ||
return this.getKeyItemOffset(key); | ||
return this.getKeyItemOffset(key, exclusive); | ||
} | ||
@@ -73,0 +73,0 @@ |
@@ -991,3 +991,3 @@ import noop from '@x-oasis/noop'; | ||
const maxValue = this._bufferSet.getMaxValue(); | ||
let startOffset = this.getIndexKeyOffset(minValue); | ||
let startOffset = this.getIndexKeyOffset(minValue, false); | ||
@@ -1043,3 +1043,3 @@ for (let index = minValue; index <= maxValue; index++) { | ||
key: 'spacer_before', | ||
length: this.getIndexKeyOffset(visibleStartIndex), | ||
length: this.getIndexKeyOffset(visibleStartIndex, false), | ||
isSpace: true, | ||
@@ -1071,3 +1071,3 @@ isSticky: false, | ||
(this.getTotalLength() as number) - | ||
this.getIndexKeyOffset(visibleEndIndex + 1), | ||
this.getIndexKeyOffset(visibleEndIndex + 1, false), | ||
isSpace: true, | ||
@@ -1074,0 +1074,0 @@ isSticky: false, |
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
1470039