kopia lustrzana https://github.com/backface/turtlestitch
fixed #169
rodzic
daff84a97a
commit
9450ed0511
|
@ -1917,3 +1917,6 @@ ______
|
||||||
------
|
------
|
||||||
* Objects, GUI: prevent costumes with CORS-tainted canvases, expected to fix #155, #154, #151, #148, #147, #127 for future projects
|
* Objects, GUI: prevent costumes with CORS-tainted canvases, expected to fix #155, #154, #151, #148, #147, #127 for future projects
|
||||||
* BYOB: Prevent local custom blocks in global custom block definitions, fixes #167 for future projects
|
* BYOB: Prevent local custom blocks in global custom block definitions, fixes #167 for future projects
|
||||||
|
|
||||||
|
130919
|
||||||
|
* Objects: fixed #169 (sprites are sometimes off-placed when the project is loaded)
|
||||||
|
|
10
objects.js
10
objects.js
|
@ -124,7 +124,7 @@ PrototypeHatBlockMorph*/
|
||||||
|
|
||||||
// Global stuff ////////////////////////////////////////////////////////
|
// Global stuff ////////////////////////////////////////////////////////
|
||||||
|
|
||||||
modules.objects = '2013-September-18';
|
modules.objects = '2013-September-19';
|
||||||
|
|
||||||
var SpriteMorph;
|
var SpriteMorph;
|
||||||
var StageMorph;
|
var StageMorph;
|
||||||
|
@ -1250,6 +1250,7 @@ SpriteMorph.prototype.drawNew = function () {
|
||||||
isFlipped,
|
isFlipped,
|
||||||
isLoadingCostume = this.costume &&
|
isLoadingCostume = this.costume &&
|
||||||
typeof this.costume.loaded === 'function',
|
typeof this.costume.loaded === 'function',
|
||||||
|
cst,
|
||||||
pic, // (flipped copy of) actual costume based on my rotation style
|
pic, // (flipped copy of) actual costume based on my rotation style
|
||||||
stageScale = this.parent instanceof StageMorph ?
|
stageScale = this.parent instanceof StageMorph ?
|
||||||
this.parent.scale : 1,
|
this.parent.scale : 1,
|
||||||
|
@ -1332,15 +1333,16 @@ SpriteMorph.prototype.drawNew = function () {
|
||||||
SpriteMorph.uber.drawNew.call(this, facing);
|
SpriteMorph.uber.drawNew.call(this, facing);
|
||||||
this.rotationOffset = this.extent().divideBy(2);
|
this.rotationOffset = this.extent().divideBy(2);
|
||||||
if (isLoadingCostume) { // retry until costume is done loading
|
if (isLoadingCostume) { // retry until costume is done loading
|
||||||
|
cst = this.costume;
|
||||||
handle = setInterval(
|
handle = setInterval(
|
||||||
function () {
|
function () {
|
||||||
myself.changed();
|
myself.wearCostume(cst);
|
||||||
myself.drawNew();
|
|
||||||
myself.changed();
|
|
||||||
clearInterval(handle);
|
clearInterval(handle);
|
||||||
},
|
},
|
||||||
100
|
100
|
||||||
);
|
);
|
||||||
|
return myself.wearCostume(null);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.version = Date.now();
|
this.version = Date.now();
|
||||||
|
|
Ładowanie…
Reference in New Issue