summaryrefslogtreecommitdiff
path: root/byob.js
diff options
context:
space:
mode:
authorjmoenig <jens@moenig.org>2013-10-04 16:54:16 +0200
committerjmoenig <jens@moenig.org>2013-10-04 16:54:16 +0200
commit020cac64b183ba0edc07d3e3d624390d056f542d (patch)
treedd5ae3f774f040abbcb1cbb7b4dad8b7d00d5fc8 /byob.js
parent4e501e00ad6185fb631d4c6851dfd5383fdc19b7 (diff)
downloadsnap-byow-020cac64b183ba0edc07d3e3d624390d056f542d.tar.gz
snap-byow-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.js11
1 files changed, 10 insertions, 1 deletions
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');