diff options
| author | jmoenig <jens@moenig.org> | 2013-10-04 16:54:16 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2013-10-04 16:54:16 +0200 |
| commit | 020cac64b183ba0edc07d3e3d624390d056f542d (patch) | |
| tree | dd5ae3f774f040abbcb1cbb7b4dad8b7d00d5fc8 /byob.js | |
| parent | 4e501e00ad6185fb631d4c6851dfd5383fdc19b7 (diff) | |
| download | snap-020cac64b183ba0edc07d3e3d624390d056f542d.tar.gz snap-020cac64b183ba0edc07d3e3d624390d056f542d.zip | |
"plain block prototype labels" preference setting
hide / show the (+) symbols in the block editor
Diffstat (limited to 'byob.js')
| -rw-r--r-- | byob.js | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -105,7 +105,7 @@ CommentMorph, localize, CSlotMorph, SpeechBubbleMorph, MorphicPreferences*/ // Global stuff //////////////////////////////////////////////////////// -modules.byob = '2013-September-18'; +modules.byob = '2013-October-04'; // Declarations @@ -2081,6 +2081,10 @@ BlockLabelPlaceHolderMorph.prototype = new StringMorph(); BlockLabelPlaceHolderMorph.prototype.constructor = BlockLabelPlaceHolderMorph; BlockLabelPlaceHolderMorph.uber = StringMorph.prototype; +// BlockLabelPlaceHolderMorph preferences settings + +BlockLabelPlaceHolderMorph.prototype.plainLabel = false; // always show (+) + // BlockLabelPlaceHolderMorph instance creation: function BlockLabelPlaceHolderMorph() { @@ -2101,6 +2105,11 @@ BlockLabelPlaceHolderMorph.prototype.init = function () { BlockLabelPlaceHolderMorph.prototype.drawNew = function () { var context, width, x, y, cx, cy; + // set my text contents depending on the "plainLabel" flag + if (this.plainLabel) { + this.text = this.isHighlighted ? ' + ' : ''; + } + // initialize my surface property this.image = newCanvas(); context = this.image.getContext('2d'); |
