summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-09-19 12:26:09 +0200
committerjmoenig <jens@moenig.org>2013-09-19 12:26:09 +0200
commit9450ed0511d08bce16e107a0fe5e924f289e5e88 (patch)
tree6a2d0bb0b234a2fc90f6c655455fb80bdbbfa371 /objects.js
parentdaff84a97a7b0936f6008b8458dec22ba42b151b (diff)
downloadsnap-yow-9450ed0511d08bce16e107a0fe5e924f289e5e88.tar.gz
snap-yow-9450ed0511d08bce16e107a0fe5e924f289e5e88.zip
fixed #169
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js10
1 files changed, 6 insertions, 4 deletions
diff --git a/objects.js b/objects.js
index 398a61d..e7f1bbc 100644
--- a/objects.js
+++ b/objects.js
@@ -124,7 +124,7 @@ PrototypeHatBlockMorph*/
// Global stuff ////////////////////////////////////////////////////////
-modules.objects = '2013-September-18';
+modules.objects = '2013-September-19';
var SpriteMorph;
var StageMorph;
@@ -1250,6 +1250,7 @@ SpriteMorph.prototype.drawNew = function () {
isFlipped,
isLoadingCostume = this.costume &&
typeof this.costume.loaded === 'function',
+ cst,
pic, // (flipped copy of) actual costume based on my rotation style
stageScale = this.parent instanceof StageMorph ?
this.parent.scale : 1,
@@ -1332,15 +1333,16 @@ SpriteMorph.prototype.drawNew = function () {
SpriteMorph.uber.drawNew.call(this, facing);
this.rotationOffset = this.extent().divideBy(2);
if (isLoadingCostume) { // retry until costume is done loading
+ cst = this.costume;
handle = setInterval(
function () {
- myself.changed();
- myself.drawNew();
- myself.changed();
+ myself.wearCostume(cst);
clearInterval(handle);
},
100
);
+ return myself.wearCostume(null);
+
}
}
this.version = Date.now();