Sounds get updated in storage and vm runtime when they are updated in the sound editor. The updateSvg function ensures that the costume that was edited has an updated dataFormat property in the vm runtime. This is specifically for when pngs get edited in the vector editor. Their file format should then get updated to svg.

This commit is contained in:
Karishma Chadha 2018-02-14 16:52:41 -05:00
parent 52c77d9fb0
commit 089df0a50f

View file

@ -513,6 +513,9 @@ class VirtualMachine extends EventEmitter {
storage.DataFormat.SVG,
(new TextEncoder()).encode(svg)
);
// If we're in here, we've edited an svg in the vector editor,
// so the dataFormat should be 'svg'
costume.dataFormat = storage.DataFormat.SVG;
this.emitTargetsUpdate();
}