mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-13 11:45:45 +03:00
interface: uncomment virtualscroller scroll catch
This commit is contained in:
parent
dda7dad2b1
commit
495be3bacb
@ -164,7 +164,7 @@ export default class VirtualScroller extends Component<VirtualScrollerProps, Vir
|
|||||||
[...startBuffer].reverse().slice(0, (visibleItems.size - visibleItems.size % 5))
|
[...startBuffer].reverse().slice(0, (visibleItems.size - visibleItems.size % 5))
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
startBuffer.forEach((_datum, index) => {
|
startBuffer.forEach((_datum, index) => {
|
||||||
startgap -= this.heightOf(index);
|
startgap -= this.heightOf(index);
|
||||||
});
|
});
|
||||||
@ -175,7 +175,7 @@ export default class VirtualScroller extends Component<VirtualScrollerProps, Vir
|
|||||||
if (smallest && smallest[0].eq(firstVisibleKey)) {
|
if (smallest && smallest[0].eq(firstVisibleKey)) {
|
||||||
this.loadRows(false);
|
this.loadRows(false);
|
||||||
}
|
}
|
||||||
const lastVisibleKey =
|
const lastVisibleKey =
|
||||||
visibleItems.peekLargest()?.[0]
|
visibleItems.peekLargest()?.[0]
|
||||||
?? bigInt(this.estimateIndexFromScrollTop(scrollTop + windowHeight)!);
|
?? bigInt(this.estimateIndexFromScrollTop(scrollTop + windowHeight)!);
|
||||||
|
|
||||||
@ -238,13 +238,13 @@ export default class VirtualScroller extends Component<VirtualScrollerProps, Vir
|
|||||||
|
|
||||||
this.window = element;
|
this.window = element;
|
||||||
if (this.props.origin === 'bottom') {
|
if (this.props.origin === 'bottom') {
|
||||||
/* element.addEventListener('wheel', (event) => {
|
element.addEventListener('wheel', (event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
const normalized = normalizeWheel(event);
|
const normalized = normalizeWheel(event);
|
||||||
element.scrollBy(0, normalized.pixelY * -1);
|
element.scrollBy(0, normalized.pixelY * -1);
|
||||||
return false;
|
return false;
|
||||||
}, { passive: false });
|
}, { passive: false });
|
||||||
*/
|
|
||||||
window.addEventListener('keydown', this.invertedKeyHandler, { passive: false });
|
window.addEventListener('keydown', this.invertedKeyHandler, { passive: false });
|
||||||
}
|
}
|
||||||
this.resetScroll();
|
this.resetScroll();
|
||||||
|
Loading…
Reference in New Issue
Block a user