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 bug with rerendering map after webglcontexlost #4725

Merged
merged 2 commits into from
May 19, 2017

Conversation

cdawi
Copy link

@cdawi cdawi commented May 19, 2017

On IE 11 and Edge map sometimes stops refreshing (loading new content).

It is caused by webglcontextlost event being fired while frame is rendered. (easiest way to reproduce is to run frame-duration benchmark several times on IE)
After webglcontextrestored event is fired map tries to rerender itself by calling resize() and then move event fires which calls _rerender().
Hovewer it hits condition if (this.style && !this._frameId) and stops.
this._frameId is not cleared, map cannot rerender and stops rendering new content.

This pull request cleares map._frameId when webglcontextlost event is fired so it enables proper rendering restoration after losing webgl context.

Launch Checklist

  • briefly describe the changes in this PR
  • manually test the debug page

Copy link
Contributor

@jfirebaugh jfirebaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

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.

None yet

2 participants