From 020cac64b183ba0edc07d3e3d624390d056f542d Mon Sep 17 00:00:00 2001 From: jmoenig Date: Fri, 4 Oct 2013 16:54:16 +0200 Subject: "plain block prototype labels" preference setting hide / show the (+) symbols in the block editor --- byob.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'byob.js') diff --git a/byob.js b/byob.js index 004ef87..82b795d 100644 --- a/byob.js +++ b/byob.js @@ -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'); -- cgit v1.3.1