Skip to content

Commit 0acff7c

Browse files
committed
Document subtlety in setting SVG skin dimensions
1 parent 80d6fa6 commit 0acff7c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/SVGSkin.js

+3
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,9 @@ class SVGSkin extends Skin {
303303

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

0 commit comments

Comments
 (0)