diff options
| author | jmoenig <jens@moenig.org> | 2015-06-25 15:11:51 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2015-06-25 15:11:51 +0200 |
| commit | 4c21c9f187033172fa58a1bd3100d7c494617f10 (patch) | |
| tree | 306711248c182c434a64c662322d61013435fe7f /lists.js | |
| parent | 58cae438bbd48f4e08f265917d4aada9e06e6cb6 (diff) | |
| download | snap-4c21c9f187033172fa58a1bd3100d7c494617f10.tar.gz snap-4c21c9f187033172fa58a1bd3100d7c494617f10.zip | |
Revert to "new" for object creation
and prepare for new release
Diffstat (limited to 'lists.js')
| -rw-r--r-- | lists.js | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -7,7 +7,7 @@ written by Jens Mönig and Brian Harvey jens@moenig.org, bh@cs.berkeley.edu - Copyright (C) 2014 by Jens Mönig and Brian Harvey + Copyright (C) 2015 by Jens Mönig and Brian Harvey This file is part of Snap!. @@ -61,7 +61,7 @@ PushButtonMorph, SyntaxElementMorph, Color, Point, WatcherMorph, StringMorph, SpriteMorph, ScrollFrameMorph, CellMorph, ArrowMorph, MenuMorph, snapEquals, Morph, isNil, localize, MorphicPreferences*/ -modules.lists = '2014-November-20'; +modules.lists = '2015-June-25'; var List; var ListWatcherMorph; @@ -363,7 +363,7 @@ List.prototype.equalTo = function (other) { // ListWatcherMorph inherits from BoxMorph: -ListWatcherMorph.prototype = Object.create(BoxMorph.prototype); +ListWatcherMorph.prototype = new BoxMorph(); ListWatcherMorph.prototype.constructor = ListWatcherMorph; ListWatcherMorph.uber = BoxMorph.prototype; @@ -388,13 +388,6 @@ 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(), @@ -443,6 +436,13 @@ 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,7 +634,7 @@ ListWatcherMorph.prototype.setStartIndex = function (index) { }; ListWatcherMorph.prototype.fixLayout = function () { - if (!this.label) return; + if (!this.label) {return; } Morph.prototype.trackChanges = false; if (this.frame) { this.arrangeCells(); |
