fixed larger variable watcher readout option

pull/95/head
jmoenig 2020-05-06 08:46:25 +02:00
rodzic 08c25e1209
commit 33fd01b37f
1 zmienionych plików z 15 dodań i 12 usunięć

Wyświetl plik

@ -10621,6 +10621,11 @@ CellMorph.prototype.init = function (contents, color, idx, parentCell) {
CellMorph.prototype.big = function () {
this.isBig = true;
this.changed();
if (this.contentsMorph instanceof TextMorph) {
this.contentsMorph.setFontSize(
SyntaxElementMorph.prototype.fontSize * 1.5
);
}
this.fixLayout(true);
this.rerender();
};
@ -10628,6 +10633,11 @@ CellMorph.prototype.big = function () {
CellMorph.prototype.normal = function () {
this.isBig = false;
this.changed();
if (this.contentsMorph instanceof TextMorph) {
this.contentsMorph.setFontSize(
SyntaxElementMorph.prototype.fontSize
);
}
this.fixLayout(true);
this.rerender();
};
@ -10695,6 +10705,10 @@ CellMorph.prototype.createContents = function () {
isSameTable = this.contentsMorph instanceof TableFrameMorph
&& (this.contentsMorph.tableMorph.table === this.contents);
if (this.isBig) {
fontSize = fontSize * 1.5;
}
if (this.contentsMorph && !isSameList && !isSameTable) {
this.contentsMorph.destroy();
this.version = null;
@ -10821,12 +10835,6 @@ CellMorph.prototype.update = function () {
};
CellMorph.prototype.render = function (ctx) {
var fontSize = SyntaxElementMorph.prototype.fontSize;
if (this.isBig) {
fontSize = fontSize * 1.5;
}
// draw my outline
if ((this.edge === 0) && (this.border === 0)) {
BoxMorph.uber.render.call(this, ctx);
@ -10890,12 +10898,7 @@ CellMorph.prototype.drawShadow = function (context, radius, inset) {
// CellMorph editing (inside list watchers):
CellMorph.prototype.layoutChanged = function () {
var fontSize = SyntaxElementMorph.prototype.fontSize,
listWatcher = this.parentThatIsA(ListWatcherMorph);
if (this.isBig) {
fontSize = fontSize * 1.5;
}
var listWatcher = this.parentThatIsA(ListWatcherMorph);
// adjust my layout
this.bounds.setHeight(this.contentsMorph.height()