Skip to content

Commit

Permalink
Document subtlety in setting SVG skin dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
adroitwhiz committed Jun 30, 2021
1 parent 80d6fa6 commit 0acff7c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/SVGSkin.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,9 @@ class SVGSkin extends Skin {

this.resetMIPs();
this._svgImageLoaded = true;
// While we're setting the size and rotation center before the image is loaded, this doesn't cause the skin
// to appear in the wrong place/with the wrong size for a few frames while the new image is loading, because
// we don't emit this event, telling drawables using this skin to update, until the image is loaded.
this.emit(Skin.Events.WasAltered);
};

Expand Down

0 comments on commit 0acff7c

Please sign in to comment.