kopia lustrzana https://github.com/backface/turtlestitch
more watcher and result bubble migrations
rodzic
044101260b
commit
26e9e689a5
|
@ -148,7 +148,7 @@ CustomCommandBlockMorph, SymbolMorph, ToggleButtonMorph, DialMorph*/
|
|||
|
||||
// Global stuff ////////////////////////////////////////////////////////
|
||||
|
||||
modules.blocks = '2020-March-10';
|
||||
modules.blocks = '2020-March-16';
|
||||
|
||||
var SyntaxElementMorph;
|
||||
var BlockMorph;
|
||||
|
@ -2138,14 +2138,15 @@ SyntaxElementMorph.prototype.showBubble = function (value, exportPic, target) {
|
|||
if (isSnapObject(value)) {
|
||||
img = value.thumbnail(new Point(40, 40));
|
||||
morphToShow = new Morph();
|
||||
morphToShow.silentSetWidth(img.width);
|
||||
morphToShow.silentSetHeight(img.height);
|
||||
morphToShow.image = img;
|
||||
morphToShow.isCachingImage = true;
|
||||
morphToShow.bounds.setWidth(img.width);
|
||||
morphToShow.bounds.setHeight(img.height);
|
||||
morphToShow.cachedImage = img;
|
||||
morphToShow.version = value.version;
|
||||
morphToShow.step = function () {
|
||||
if (this.version !== value.version) {
|
||||
img = value.thumbnail(new Point(40, 40));
|
||||
this.image = img;
|
||||
this.cachedImage = img;
|
||||
this.version = value.version;
|
||||
this.changed();
|
||||
}
|
||||
|
@ -2153,24 +2154,28 @@ SyntaxElementMorph.prototype.showBubble = function (value, exportPic, target) {
|
|||
} else {
|
||||
img = value.fullImage();
|
||||
morphToShow = new Morph();
|
||||
morphToShow.silentSetWidth(img.width);
|
||||
morphToShow.silentSetHeight(img.height);
|
||||
morphToShow.image = img;
|
||||
morphToShow.isCachingImage = true;
|
||||
morphToShow.bounds.setWidth(img.width);
|
||||
morphToShow.bounds.setHeight(img.height);
|
||||
morphToShow.cachedImage = img;
|
||||
}
|
||||
} else if (value instanceof Costume) {
|
||||
img = value.thumbnail(new Point(40, 40));
|
||||
morphToShow = new Morph();
|
||||
morphToShow.silentSetWidth(img.width);
|
||||
morphToShow.silentSetHeight(img.height);
|
||||
morphToShow.image = img;
|
||||
morphToShow = new Morph();
|
||||
morphToShow.isCachingImage = true;
|
||||
morphToShow.bounds.setWidth(img.width);
|
||||
morphToShow.bounds.setHeight(img.height);
|
||||
morphToShow.cachedImage = img;
|
||||
} else if (value instanceof Sound) {
|
||||
morphToShow = new SymbolMorph('notes', 30);
|
||||
} else if (value instanceof Context) {
|
||||
img = value.image();
|
||||
morphToShow = new Morph();
|
||||
morphToShow.silentSetWidth(img.width);
|
||||
morphToShow.silentSetHeight(img.height);
|
||||
morphToShow.image = img;
|
||||
morphToShow.isCachingImage = true;
|
||||
morphToShow.bounds.setWidth(img.width);
|
||||
morphToShow.bounds.setHeight(img.height);
|
||||
morphToShow.cachedImage = img;
|
||||
} else if (typeof value === 'boolean') {
|
||||
morphToShow = SpriteMorph.prototype.booleanMorph.call(
|
||||
null,
|
||||
|
|
|
@ -7068,7 +7068,7 @@ SpriteMorph.prototype.fullThumbnail = function (extentPoint) {
|
|||
SpriteMorph.prototype.booleanMorph = function (bool) {
|
||||
var sym = new BooleanSlotMorph(bool);
|
||||
sym.isStatic = true;
|
||||
sym.drawNew();
|
||||
sym.fixLayout();
|
||||
return sym;
|
||||
};
|
||||
|
||||
|
@ -10906,26 +10906,31 @@ CellMorph.prototype.createContents = function () {
|
|||
this.contents
|
||||
).fullImage();
|
||||
this.contentsMorph = new Morph();
|
||||
this.contentsMorph.silentSetWidth(img.width);
|
||||
this.contentsMorph.silentSetHeight(img.height);
|
||||
this.contentsMorph.image = img;
|
||||
this.contentsMorph.isCachingImage = true;
|
||||
this.contentsMorph.bounds.setWidth(img.width);
|
||||
this.contentsMorph.bounds.setHeight(img.height);
|
||||
this.contentsMorph.cachedImage = img;
|
||||
} else if (this.contents instanceof HTMLCanvasElement) {
|
||||
img = this.contents;
|
||||
this.contentsMorph = new Morph();
|
||||
this.contentsMorph.silentSetWidth(this.contents.width);
|
||||
this.contentsMorph.silentSetHeight(this.contents.height);
|
||||
this.contentsMorph.image = this.contents;
|
||||
this.contentsMorph.isCachingImage = true;
|
||||
this.contentsMorph.bounds.setWidth(img.width);
|
||||
this.contentsMorph.bounds.setHeight(img.height);
|
||||
this.contentsMorph.cachedImage = img;
|
||||
} else if (this.contents instanceof Context) {
|
||||
img = this.contents.image();
|
||||
this.contentsMorph = new Morph();
|
||||
this.contentsMorph.silentSetWidth(img.width);
|
||||
this.contentsMorph.silentSetHeight(img.height);
|
||||
this.contentsMorph.image = img;
|
||||
this.contentsMorph.isCachingImage = true;
|
||||
this.contentsMorph.bounds.setWidth(img.width);
|
||||
this.contentsMorph.bounds.setHeight(img.height);
|
||||
this.contentsMorph.cachedImage = img;
|
||||
} else if (this.contents instanceof Costume) {
|
||||
img = this.contents.thumbnail(new Point(40, 40));
|
||||
this.contentsMorph = new Morph();
|
||||
this.contentsMorph.silentSetWidth(img.width);
|
||||
this.contentsMorph.silentSetHeight(img.height);
|
||||
this.contentsMorph.image = img;
|
||||
this.contentsMorph.isCachingImage = true;
|
||||
this.contentsMorph.bounds.setWidth(img.width);
|
||||
this.contentsMorph.bounds.setHeight(img.height);
|
||||
this.contentsMorph.cachedImage = img;
|
||||
} else if (this.contents instanceof Sound) {
|
||||
this.contentsMorph = new SymbolMorph('notes', 30);
|
||||
} else if (this.contents instanceof List) {
|
||||
|
|
Ładowanie…
Reference in New Issue