diff options
| -rw-r--r-- | gui.js | 2 | ||||
| -rwxr-xr-x | history.txt | 1 | ||||
| -rw-r--r-- | store.js | 21 |
3 files changed, 22 insertions, 2 deletions
@@ -2850,7 +2850,7 @@ IDE_Morph.prototype.exportGlobalBlocks = function () { }; IDE_Morph.prototype.exportSprite = function (sprite) { - var str = this.serializer.serialize(sprite); + var str = this.serializer.serialize(sprite.allParts()); window.open('data:text/xml,<sprites app="' + this.serializer.app + '" version="' diff --git a/history.txt b/history.txt index 0938517..c64bba8 100755 --- a/history.txt +++ b/history.txt @@ -2243,3 +2243,4 @@ ______ ------ * fixed #526, thanks, Bernat, for reporting it! * Objects, GUI: duplicate and clone nested sprites +* GUI, Store: export and import nested sprites @@ -61,7 +61,7 @@ SyntaxElementMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2014-Jun-04'; +modules.store = '2014-July-29'; // XML_Serializer /////////////////////////////////////////////////////// @@ -618,6 +618,25 @@ SnapSerializer.prototype.loadSprites = function (xmlString, ide) { sprite.gotoXY(+model.attributes.x || 0, +model.attributes.y || 0); myself.loadObject(sprite, model); }); + + // restore nesting associations + project.stage.children.forEach(function (sprite) { + var anchor; + if (sprite.nestingInfo) { // only sprites may have nesting info + anchor = project.sprites[sprite.nestingInfo.anchor]; + if (anchor) { + anchor.attachPart(sprite); + } + sprite.rotatesWithAnchor = (sprite.nestingInfo.synch === 'true'); + } + }); + project.stage.children.forEach(function (sprite) { + if (sprite.nestingInfo) { // only sprites may have nesting info + sprite.nestingScale = +(sprite.nestingInfo.scale || sprite.scale); + delete sprite.nestingInfo; + } + }); + this.objects = {}; this.project = {}; this.mediaDict = {}; |
