summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Dinsmore <nathan@users.noreply.github.com>2015-06-18 04:29:26 -0400
committerNathan Dinsmore <nathan@users.noreply.github.com>2015-06-18 04:29:26 -0400
commit995e782147c202a8afa64cabe204849b955f153b (patch)
tree13bb63fdabcc28ac8ef86576cc11863a9277af67
parent0245a81fc04cf787bae2f3467f850a07d9791ca7 (diff)
downloadsnap-995e782147c202a8afa64cabe204849b955f153b.tar.gz
snap-995e782147c202a8afa64cabe204849b955f153b.zip
Fix ListWatcherMorph initialization
-rw-r--r--lists.js15
1 files changed, 8 insertions, 7 deletions
diff --git a/lists.js b/lists.js
index be7f933..769b8b3 100644
--- a/lists.js
+++ b/lists.js
@@ -388,6 +388,13 @@ ListWatcherMorph.prototype.init = function (list, parentCell) {
this.lastCell = null;
this.parentCell = parentCell || null; // for circularity detection
+ ListWatcherMorph.uber.init.call(
+ this,
+ SyntaxElementMorph.prototype.rounding,
+ 1.000001, // shadow bug in Chrome,
+ new Color(120, 120, 120)
+ );
+
// elements declarations
this.label = new StringMorph(
localize('length: ') + this.list.length(),
@@ -436,13 +443,6 @@ ListWatcherMorph.prototype.init = function (list, parentCell) {
this.plusButton.drawNew();
this.plusButton.fixLayout();
- ListWatcherMorph.uber.init.call(
- this,
- SyntaxElementMorph.prototype.rounding,
- 1.000001, // shadow bug in Chrome,
- new Color(120, 120, 120)
- );
-
this.color = new Color(220, 220, 220);
this.isDraggable = true;
this.setExtent(new Point(80, 70).multiplyBy(
@@ -634,6 +634,7 @@ ListWatcherMorph.prototype.setStartIndex = function (index) {
};
ListWatcherMorph.prototype.fixLayout = function () {
+ if (!this.label) return;
Morph.prototype.trackChanges = false;
if (this.frame) {
this.arrangeCells();