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(SVGrenderer): reset svgSize on remove from map #5966

Merged
merged 1 commit into from Dec 19, 2017

Conversation

ghybs
Copy link
Collaborator

@ghybs ghybs commented Dec 15, 2017

Hi,

This PR resets the _svgSize cache on SVG Renderer, so that when it is re-used and re-added on map, in _update method, the check on _svgSize triggers and re-assigns width and height attributes on the _container.

Otherwise, the latter no longer has width and height, therefore is invisible, until the viewport size is changed.

I will try to include a unit test later on.

Fix #5960

so that when the SVG Renderer is re-used and re-added on map, in `_update` method, the check on `_svgSize` triggers and re-assigns `width` and `height` attributes on the `_container`. Otherwise, the latter no longer has width and height, therefore is invisible, until the viewport size is changed.
Copy link
Sponsor Collaborator

@cherniavskii cherniavskii left a comment

Choose a reason for hiding this comment

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

👍

@perliedman perliedman merged commit b1e59c9 into master Dec 19, 2017
@perliedman perliedman deleted the fixSvgRendererSizeOnRemove branch December 19, 2017 11:31
@perliedman
Copy link
Member

Nice 👍

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

3 participants