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

Fix dummy app #13

Merged
merged 1 commit into from
Aug 18, 2015
Merged

Fix dummy app #13

merged 1 commit into from
Aug 18, 2015

Conversation

raytiley
Copy link
Contributor

This fixes an issue related to the update to layout-bin-packercausing
an NaN index when calculating the starting index. It invaldiates cells when
rendering. This is needed to cause the cells to update during scrolling.

Basically how this works now is rAF monitors the scroll position and
if the positions change between frames it schedules a rerender. The
willRender hook then invalidates the cells CP which ensures the
correct items are rendered. Then glimmer takes over and renders the
correct cells.

I also guarded contentElement not being defined on initial render.

This fixes an issue related to the update to `layout-bin-packer`causing
an `NaN` index when calculating the starting index. It invaldiates `cells` when
rendering. This is needed to cause the cells to update during scrolling.

Basically how this works now is `rAF` monitors the scroll position and
if the positions change between frames it schedules a `rerender`. The
`willRender` hook then invalidates the `cells` CP which ensures the
correct items are rendered. Then glimmer takes over and renders the
correct cells.

I also guarded `contentElement` not being defined on initial render.

Fix js hint
mmun added a commit that referenced this pull request Aug 18, 2015
@mmun mmun merged commit e6ef07b into adopted-ember-addons:master Aug 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants