diff options
| author | jmoenig <jens@moenig.org> | 2013-07-08 08:19:19 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2013-07-08 08:19:19 +0200 |
| commit | 09fb8f7f822b378f6ca6c20e6c7c7bcbcd208180 (patch) | |
| tree | 3ced572901d1af425f84aec4c660b0ee9143a6a6 /store.js | |
| parent | 3314477dc2068772482af6c638971e6b49f46428 (diff) | |
| download | snap-09fb8f7f822b378f6ca6c20e6c7c7bcbcd208180.tar.gz snap-09fb8f7f822b378f6ca6c20e6c7c7bcbcd208180.zip | |
fixed serialization placement-bug for sprites
thanks, Caitie, for reporting this bug and for supplying a project
which let me reproduce it!
Diffstat (limited to 'store.js')
| -rw-r--r-- | store.js | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -61,7 +61,7 @@ SyntaxElementMorph*/ // Global stuff //////////////////////////////////////////////////////// -modules.store = '2013-July-04'; +modules.store = '2013-July-08'; // XML_Serializer /////////////////////////////////////////////////////// @@ -1349,11 +1349,8 @@ StageMorph.prototype.toXML = function (serializer) { SpriteMorph.prototype.toXML = function (serializer) { var stage = this.parentThatIsA(StageMorph), - position = stage ? - this.center().subtract(stage.center()) : this.center(), ide = stage ? stage.parentThatIsA(IDE_Morph) : null, idx = ide ? ide.sprites.asArray().indexOf(this) + 1 : 0; - return serializer.format( '<sprite name="@" idx="@" x="@" y="@"' + ' heading="@"' + @@ -1370,8 +1367,8 @@ SpriteMorph.prototype.toXML = function (serializer) { '</sprite>', this.name, idx, - position.x, - -position.y, + this.xPosition(), + this.yPosition(), this.heading, this.scale, this.rotationStyle, |
