FXMisc / Flowless

Efficient VirtualFlow for JavaFX
BSD 2-Clause "Simplified" License
185 stars 38 forks source link

Suspend VirtualFlow's scroll-related values until after fully rendered #60

Closed JordanMartinez closed 4 years ago

JordanMartinez commented 6 years ago

The VirtualFlow's scroll-related values (estimated & total) are calculated based on the average height/width of a given cell's node. When the VirtualFlow is rendering its children, sometimes these averages get recalculated to a different value than they were before the rendering began. After rendering, these values are often set back to what they were before the rendering started.

However, since there is nothing stopping these values from propagating to their public end points (estimated & total scroll X/Y values), anything listening to them or subscribed to them will be updated immediately as well. As a result, one cannot use the scroll values to trigger some change when they are updated, as the layout process itself will always trigger such a change even when one doesn't ultimately occur.