kopia lustrzana https://github.com/backface/turtlestitch
fixed larger variable watcher readout option
rodzic
08c25e1209
commit
33fd01b37f
|
@ -10621,6 +10621,11 @@ CellMorph.prototype.init = function (contents, color, idx, parentCell) {
|
||||||
CellMorph.prototype.big = function () {
|
CellMorph.prototype.big = function () {
|
||||||
this.isBig = true;
|
this.isBig = true;
|
||||||
this.changed();
|
this.changed();
|
||||||
|
if (this.contentsMorph instanceof TextMorph) {
|
||||||
|
this.contentsMorph.setFontSize(
|
||||||
|
SyntaxElementMorph.prototype.fontSize * 1.5
|
||||||
|
);
|
||||||
|
}
|
||||||
this.fixLayout(true);
|
this.fixLayout(true);
|
||||||
this.rerender();
|
this.rerender();
|
||||||
};
|
};
|
||||||
|
@ -10628,6 +10633,11 @@ CellMorph.prototype.big = function () {
|
||||||
CellMorph.prototype.normal = function () {
|
CellMorph.prototype.normal = function () {
|
||||||
this.isBig = false;
|
this.isBig = false;
|
||||||
this.changed();
|
this.changed();
|
||||||
|
if (this.contentsMorph instanceof TextMorph) {
|
||||||
|
this.contentsMorph.setFontSize(
|
||||||
|
SyntaxElementMorph.prototype.fontSize
|
||||||
|
);
|
||||||
|
}
|
||||||
this.fixLayout(true);
|
this.fixLayout(true);
|
||||||
this.rerender();
|
this.rerender();
|
||||||
};
|
};
|
||||||
|
@ -10695,6 +10705,10 @@ CellMorph.prototype.createContents = function () {
|
||||||
isSameTable = this.contentsMorph instanceof TableFrameMorph
|
isSameTable = this.contentsMorph instanceof TableFrameMorph
|
||||||
&& (this.contentsMorph.tableMorph.table === this.contents);
|
&& (this.contentsMorph.tableMorph.table === this.contents);
|
||||||
|
|
||||||
|
if (this.isBig) {
|
||||||
|
fontSize = fontSize * 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.contentsMorph && !isSameList && !isSameTable) {
|
if (this.contentsMorph && !isSameList && !isSameTable) {
|
||||||
this.contentsMorph.destroy();
|
this.contentsMorph.destroy();
|
||||||
this.version = null;
|
this.version = null;
|
||||||
|
@ -10821,12 +10835,6 @@ CellMorph.prototype.update = function () {
|
||||||
};
|
};
|
||||||
|
|
||||||
CellMorph.prototype.render = function (ctx) {
|
CellMorph.prototype.render = function (ctx) {
|
||||||
var fontSize = SyntaxElementMorph.prototype.fontSize;
|
|
||||||
|
|
||||||
if (this.isBig) {
|
|
||||||
fontSize = fontSize * 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
// draw my outline
|
// draw my outline
|
||||||
if ((this.edge === 0) && (this.border === 0)) {
|
if ((this.edge === 0) && (this.border === 0)) {
|
||||||
BoxMorph.uber.render.call(this, ctx);
|
BoxMorph.uber.render.call(this, ctx);
|
||||||
|
@ -10890,12 +10898,7 @@ CellMorph.prototype.drawShadow = function (context, radius, inset) {
|
||||||
// CellMorph editing (inside list watchers):
|
// CellMorph editing (inside list watchers):
|
||||||
|
|
||||||
CellMorph.prototype.layoutChanged = function () {
|
CellMorph.prototype.layoutChanged = function () {
|
||||||
var fontSize = SyntaxElementMorph.prototype.fontSize,
|
var listWatcher = this.parentThatIsA(ListWatcherMorph);
|
||||||
listWatcher = this.parentThatIsA(ListWatcherMorph);
|
|
||||||
|
|
||||||
if (this.isBig) {
|
|
||||||
fontSize = fontSize * 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
// adjust my layout
|
// adjust my layout
|
||||||
this.bounds.setHeight(this.contentsMorph.height()
|
this.bounds.setHeight(this.contentsMorph.height()
|
||||||
|
|
Ładowanie…
Reference in New Issue