Skip to content

Commit

Permalink
fix: fix dynamic state #67
Browse files Browse the repository at this point in the history
  • Loading branch information
daybrush committed Oct 31, 2023
1 parent 96425ea commit 0f3b8c7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/infinite-viewer/src/InfiniteViewerManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,14 @@ class InfiniteViewer extends EventEmitter<InfiniteViewerEvents> {
wrapperElement.scrollLeft = scrollLeft;
wrapperElement.scrollTop = scrollTop;
}
private setDisplayVerticalScroll(displayVerticalScroll: boolean) {
this.options.displayVerticalScroll = displayVerticalScroll;
this.renderScroll();
}
private setDisplayHorizontalScroll(displayHorizontalScroll: boolean) {
this.options.displayHorizontalScroll = displayHorizontalScroll;
this.renderScroll();
}
private _onScroll = () => {
const { scrollLeft, scrollTop } = this.wrapperElement;
const {
Expand Down

0 comments on commit 0f3b8c7

Please sign in to comment.