Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 822c5b8

Browse files
committedFeb 21, 2024
Document subtlety in setting SVG skin dimensions
1 parent 9633ed2 commit 822c5b8

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
@@ -309,6 +309,9 @@ class SVGSkin extends Skin {
309309

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

0 commit comments

Comments
 (0)