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

Do not do any canvas work when there are no features to render #12792

Merged
merged 1 commit into from Sep 23, 2021

Conversation

ahocevar
Copy link
Member

Currently the vector layer renderer resizes the canvas to a width of 0 when there are no features to render. Instead, it could simply not touch the canvas at all and return null as rendered container, to avoid any rendering work.

Fixes #12791.

@ahocevar ahocevar merged commit 6d42705 into openlayers:main Sep 23, 2021
@ahocevar ahocevar deleted the no-render-work-when-no-features branch September 23, 2021 16:34
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.

CanvasVectorLayerRenderer sets canvas width to zero on every render
3 participants