handle (some cases of) extent-less costumes

snap8
Jens Mönig 2022-03-04 12:09:07 +01:00
rodzic 8677ab286e
commit 2aed5896d1
2 zmienionych plików z 5 dodań i 0 usunięć

Wyświetl plik

@ -23,6 +23,7 @@
* animation library: fixed pen state for GLIDE, thanks, Brian!
* threads: addressed security issues in the JIT-compiler, thanks, xBZZZZ!
* gui: show project name in browser tab, thanks, Peter!
* objects: handle (some cases of) extent-less costumes
### 2022-03-03
* SciSnap2 extension update (FFT), thanks, Eckart!

Wyświetl plik

@ -3824,6 +3824,10 @@ SpriteMorph.prototype.wearCostume = function (costume, noShadow) {
y = this.yPosition ? this.yPosition() : null,
idx = isNil(costume) ? null : this.costumes.asArray().indexOf(costume);
if (costume && (!costume.width() || !costume.height())) {
costume = null;
idx = null;
}
this.changed();
this.costume = costume;
this.fixLayout();