Skip to content

Conversation

@adroitwhiz
Copy link
Contributor

@adroitwhiz adroitwhiz commented Nov 1, 2019

Depends on scratchfoundation/scratch-svg-renderer#107

Resolves

Resolves #518

Proposed Changes

This PR removes the call to SVGSkin._svgRenderer.fromString from the SVGSkin.loadSVG method, in the process updating SVGSkin to use the new methods added in scratchfoundation/scratch-svg-renderer#107.

Reason for Changes

Removing the SVGSkin._svgRenderer.fromString call prevents the skin from being unnecessarily drawn twice (see #518 for more details).

Updating SVGSkin to use the new SvgRenderer methods makes the code much easier to reason about by removing unpredictable behavior (see this comment and scratchfoundation/scratch-svg-renderer#107 for more information).

@adroitwhiz adroitwhiz changed the title Remove SvgRenderer._draw call from SVGSkin.setSVG Remove SvgRenderer.fromString call from SVGSkin.setSVG Nov 2, 2019
@adroitwhiz
Copy link
Contributor Author

Closing in favor of #527

@adroitwhiz adroitwhiz closed this Nov 26, 2019
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.

The call to svg-renderer._draw in SVGSkin.setSVG isn't necessary

1 participant