Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add API for getting and showing a TargetPosition #41

Open
JordanMartinez opened this issue Jun 6, 2017 · 1 comment
Open

Add API for getting and showing a TargetPosition #41

JordanMartinez opened this issue Jun 6, 2017 · 1 comment

Comments

@JordanMartinez
Copy link
Contributor

JordanMartinez commented Jun 6, 2017

Per the end of my comment in #32:

As a side note, I think there should be a way to get the navigator's current position, so that one could use that to determine what to display after some change occurs (e.g. scroll from the current position or display an item 10 indexes higher, etc.) via VirtualFlow's show method. In order to support that functionality, there would need to be more view-related API methods that returned a TargetPosition of a specific cell.

@JordanMartinez
Copy link
Contributor Author

JordanMartinez commented Jun 6, 2017

On second thought, this might be better implemented by virtualFlow.getCellIfVisble(idx).map(c -> c.getNode().getLayoutBounds()) (or similar bounds calculations like that on the screen) and using that to calculate the offset value to use in virtualFlow.show(idx, offset)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant