daybrush / infinite-viewer

Infinite Viewer is Document Viewer Component with infinite scrolling.
https://daybrush.com/infinite-viewer/
MIT License
296 stars 33 forks source link

How to hide the scroll bars if there is no content outside of the current viewing area? #44

Closed quinn280 closed 1 year ago

quinn280 commented 1 year ago

Testable Address: https://codesandbox.io/s/zoom-2t797o?file=/src/App.js

I am hoping to toggle displayHorizontalScroll and displayVerticalScroll based on whether there is content in the current viewing area. Is there any way to do this?

For example:

In the photo below, all of the content is inside the current viewing area. In this case I would want the scroll bars to be hidden.
content

In this photo, there is some content outside of the current viewing area. In this case I would want the scroll bars to be visible.
contentoutside

daybrush commented 1 year ago

ok i'll check it out.

I'll try with a configuration similar to Figma.

daybrush commented 1 year ago

@quinn280

infinite-viewers' new version is released. Try it again.