add comment explaining onload
choice
This commit is contained in:
parent
7af5b3e207
commit
3b21ee98b6
@ -197,6 +197,7 @@ class SVGSkin extends Skin {
|
||||
const svgText = serializeSvgToString(svgTag, true /* shouldInjectFonts */);
|
||||
this._svgImageLoaded = false;
|
||||
|
||||
// If there is another load already in progress, replace the old onload to effectively cancel the old load
|
||||
this._svgImage.onload = () => {
|
||||
const {x, y, width, height} = svgTag.viewBox.baseVal;
|
||||
this._size[0] = width;
|
||||
|
Loading…
x
Reference in New Issue
Block a user