change order

This commit is contained in:
DD 2017-09-05 17:53:27 -04:00
parent 48fec12391
commit caf98cb185

View file

@ -384,9 +384,9 @@ class VirtualMachine extends EventEmitter {
*/ */
updateSvg (costumeIndex, svg, rotationCenterX, rotationCenterY) { updateSvg (costumeIndex, svg, rotationCenterX, rotationCenterY) {
const costume = this.editingTarget.sprite.costumes[costumeIndex]; const costume = this.editingTarget.sprite.costumes[costumeIndex];
if (costume && this.runtime && this.runtime.renderer) {
costume.rotationCenterX = rotationCenterX; costume.rotationCenterX = rotationCenterX;
costume.rotationCenterY = rotationCenterY; costume.rotationCenterY = rotationCenterY;
if (costume && this.runtime && this.runtime.renderer) {
this.runtime.renderer.updateSVGSkin(costume.skinId, svg, [rotationCenterX, rotationCenterY]); this.runtime.renderer.updateSVGSkin(costume.skinId, svg, [rotationCenterX, rotationCenterY]);
} }
// @todo: Also update storage in addition to renderer. Without storage, if you switch // @todo: Also update storage in addition to renderer. Without storage, if you switch