guard against broken SVG costumes when loading a project

snap8
Jens Mönig 2022-03-09 19:53:14 +01:00
rodzic defe37f9e8
commit b502d5dbb8
3 zmienionych plików z 6 dodań i 4 usunięć

Wyświetl plik

@ -5,6 +5,7 @@
* export / import sprite-local custom block definitions, under construction
* **Notable Changes:**
* **Notable Fixes:**
* guard against broken SVG costumes when loading a project
* **Documentation Updates:**
* **Translation Updates:**
@ -13,6 +14,7 @@
* byob, store, gui: export / import sprite-local custom block definitions, under construction
* byob, gui: adapted library import dialog to the new format
* byob: added collecting dependencies for sprite-local custom blocks
* objects: guard against broken SVG costumes when loading a project
## 7.3.0:
* **New Features:**

Wyświetl plik

@ -18,7 +18,7 @@
<script src="src/widgets.js?version=2021-17-09"></script>
<script src="src/blocks.js?version=2022-03-07"></script>
<script src="src/threads.js?version=2022-03-03"></script>
<script src="src/objects.js?version=2022-03-01"></script>
<script src="src/objects.js?version=2022-03-09"></script>
<script src="src/scenes.js?version=2022-03-03"></script>
<script src="src/gui.js?version=2022-03-09"></script>
<script src="src/paint.js?version=2021-07-05"></script>

Wyświetl plik

@ -87,7 +87,7 @@ BlockVisibilityDialogMorph, CostumeIconMorph, SoundIconMorph*/
/*jshint esversion: 6*/
modules.objects = '2022-March-04';
modules.objects = '2022-March-09';
var SpriteMorph;
var StageMorph;
@ -10352,11 +10352,11 @@ Costume.prototype.center = function () {
};
Costume.prototype.width = function () {
return this.contents.width;
return this.contents ? this.contents.width : 0;
};
Costume.prototype.height = function () {
return this.contents.height;
return this.contents ? this.contents.height : 0;
};
Costume.prototype.bounds = function () {