removed "hide" option from context menu of primitive blocks in the palette

snap7
jmoenig 2021-10-07 15:17:39 +02:00
rodzic aa42b393ce
commit f7012ed3c6
3 zmienionych plików z 3 dodań i 26 usunięć

Wyświetl plik

@ -40,6 +40,7 @@
### 2021-10-07
* objects, byob: new BlockVisibilityDialogMorph for bulk-selecting blocks to hide / show in the palette
* ojects: simplified palette context menu
* blocks: removed "hide" option from context menu of primitive blocks in the palette
### 2021-10-06
* threads: programmatically hide individual variables in palette

Wyświetl plik

@ -16,7 +16,7 @@
<script src="src/morphic.js?version=2021-07-09"></script>
<script src="src/symbols.js?version=2021-03-03"></script>
<script src="src/widgets.js?version=2021-07-21"></script>
<script src="src/blocks.js?version=2021-10-04"></script>
<script src="src/blocks.js?version=2021-10-07"></script>
<script src="src/threads.js?version=2021-10-06"></script>
<script src="src/objects.js?version=2021-10-07"></script>
<script src="src/scenes.js?version=2021-07-21"></script>

Wyświetl plik

@ -160,7 +160,7 @@ CustomCommandBlockMorph, ToggleButtonMorph, DialMorph, SnapExtensions*/
// Global stuff ////////////////////////////////////////////////////////
modules.blocks = '2021-October-04';
modules.blocks = '2021-October-07';
var SyntaxElementMorph;
var BlockMorph;
@ -2834,11 +2834,6 @@ BlockMorph.prototype.userMenu = function () {
'rename all blocks that\naccess this variable'
);
}
} else if (this.selector !== 'evaluateCustomBlock') {
menu.addItem(
"hide",
'hidePrimitive'
);
}
// allow toggling inheritable attributes
@ -3262,25 +3257,6 @@ BlockMorph.prototype.developersMenu = function () {
return menu;
};
BlockMorph.prototype.hidePrimitive = function () {
var ide = this.parentThatIsA(IDE_Morph),
dict,
cat;
if (!ide) {return; }
StageMorph.prototype.hiddenPrimitives[this.selector] = true;
dict = {
doWarp: 'control',
reifyScript: 'operators',
reifyReporter: 'operators',
reifyPredicate: 'operators',
doDeclareVariables: 'variables'
};
cat = dict[this.selector] || this.category;
if (cat === 'lists') {cat = 'variables'; }
ide.flushBlocksCache(cat);
ide.refreshPalette();
};
BlockMorph.prototype.isInheritedVariable = function (shadowedOnly) {
// private - only for variable getter template inside the palette
if (this.isTemplate &&