diff options
| author | jmoenig <jens@moenig.org> | 2014-06-06 13:57:45 +0200 |
|---|---|---|
| committer | jmoenig <jens@moenig.org> | 2014-06-06 13:57:45 +0200 |
| commit | 7f8d5a3d1eacdc78f61da8e82ac481bbbb825938 (patch) | |
| tree | 2589fd29d40516c3a5c171a5aca6fcff80b7cff9 /blocks.js | |
| parent | a5eace927aae19f8141eb525a72b18b757f57261 (diff) | |
| download | snap-byow-7f8d5a3d1eacdc78f61da8e82ac481bbbb825938.tar.gz snap-byow-7f8d5a3d1eacdc78f61da8e82ac481bbbb825938.zip | |
relabelling custom blocks (experimental)
Diffstat (limited to 'blocks.js')
| -rw-r--r-- | blocks.js | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -2009,6 +2009,7 @@ BlockMorph.prototype.userMenu = function () { var menu = new MenuMorph(this), world = this.world(), myself = this, + alternatives, blck; menu.addItem( @@ -2066,6 +2067,14 @@ BlockMorph.prototype.userMenu = function () { ); } ); + } else if (this.definition && this.alternatives) { // custom block + alternatives = this.alternatives(); + if (alternatives.length > 0) { + menu.addItem( + 'relabel...', + function () {myself.relabel(alternatives); } + ); + } } menu.addItem( |
