Closed Everlag closed 8 years ago
Paper header panel's scroller.scrollTop provides pixel offset from the top easily.
A cleanup/transition method would need the scroll height to be passed.
jQuery's $(paper-header-panel.scroller).scrollTop(height) does the job.
Any routing that doesn't specifically change the gallery's layout should have the scroll position retained. It should be possible for gallery elements to scroll to their appropriate position in certain contexts during or following a transition.
Perhaps include position in query string? Can they be updated without causing another state to be pushed to browser history? Do we actually want to persist scrolling across full client refreshes?
What about including a cleanup method for views? Call the method before transitioning away to allow them to track state that would be lost.
Should position be in pixel offset, accurate but potentially jarring, or increments of progressive loads, less accurate but semantically correct.