From 6135ce8a8149449af55e9c0d1bf9c9b996eb4711 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 26 Jul 2022 11:38:20 +0200 Subject: [PATCH] remove double instances of makeablock --- stitchcode/objects.js | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/stitchcode/objects.js b/stitchcode/objects.js index dac45b5a..19b4621d 100644 --- a/stitchcode/objects.js +++ b/stitchcode/objects.js @@ -1900,8 +1900,6 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(block('yPosition')); blocks.push(watcherToggle('direction')); blocks.push(block('direction')); - blocks.push('-'); - blocks.push(this.makeBlockButton(cat)); } else if (cat === 'looks') { @@ -1949,9 +1947,6 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(block('doScreenshot')); } - blocks.push('='); - blocks.push(this.makeBlockButton(cat)); - ///////////////////////////////// } else if (cat === 'sound') { @@ -1983,9 +1978,6 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(block('reportSounds')); } - blocks.push('='); - blocks.push(this.makeBlockButton(cat)); - } else if (cat === 'pen') { blocks.push(block('clear')); @@ -2001,8 +1993,6 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(block('setOpacity')); blocks.push(block('changeOpacity')); blocks.push(block('getOpacity')); - blocks.push('='); - blocks.push(this.makeBlockButton(cat)); } else if (cat === 'embroidery') { @@ -2022,15 +2012,10 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(block('jumpStitch')); blocks.push(block('tieStitch')); blocks.push(block('trimStitch')); - blocks.push('='); - blocks.push(this.makeBlockButton(cat)); } else if (cat === 'other') { blocks.push(block('zoomToFit')); - blocks.push('='); - blocks.push(this.makeBlockButton(cat)); - } else if (cat === 'colors') { blocks.push(block('setColor')); blocks.push('-'); @@ -2046,8 +2031,6 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(block('setHSB')); blocks.push(block('changeHSB')); blocks.push(block('getHSB')); - blocks.push('='); - blocks.push(this.makeBlockButton(cat)); } else if (cat === 'control') { blocks.push(block('resetAll')); @@ -2097,8 +2080,6 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(block('removeClone')); blocks.push('-'); blocks.push(block('doPauseAll')); - blocks.push('='); - blocks.push(this.makeBlockButton(cat)); } else if (cat === 'sensing') { @@ -2159,10 +2140,6 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(block('reportFrameCount')); } - blocks.push('='); - blocks.push(this.makeBlockButton(cat)); - - } else if (cat === 'operators') { blocks.push(block('reifyScript')); @@ -2224,11 +2201,6 @@ SpriteMorph.prototype.blockTemplates = function (category) { blocks.push(block('reportTypeOf')); blocks.push(block('reportTextFunction')); } - - blocks.push('='); - blocks.push(this.makeBlockButton(cat)); - - ///////////////////////////////// } else if (cat === 'variables') { @@ -2364,19 +2336,15 @@ SpriteMorph.prototype.blockTemplates = function (category) { } ///////////////////////////////// - - blocks.push('='); - + if (StageMorph.prototype.enableCodeMapping) { blocks.push(block('doMapCodeOrHeader')); blocks.push(block('doMapValueCode')); blocks.push(block('doMapListCode')); blocks.push('-'); blocks.push(block('reportMappedCode')); - blocks.push('='); } - blocks.push(this.makeBlockButton()); } return blocks; };