indicate numeric inputs in the block prototype with the # sign

pull/3/merge
Jens Mönig 2015-05-01 11:56:42 -04:00
rodzic 585d1541b8
commit c46d8093ef
1 zmienionych plików z 8 dodań i 2 usunięć

10
byob.js
Wyświetl plik

@ -106,7 +106,7 @@ SymbolMorph, isNil*/
// Global stuff ////////////////////////////////////////////////////////
modules.byob = '2015-March-02';
modules.byob = '2015-May-01';
// Declarations
@ -2049,7 +2049,13 @@ BlockLabelFragment.prototype.defTemplateSpecFragment = function () {
)) {
suff = ' \u03BB';
} else if (this.defaultValue) {
suff = ' = ' + this.defaultValue.toString();
if (this.type === '%n') {
suff = ' # = ' + this.defaultValue.toString();
} else { // 'any' or 'text'
suff = ' = ' + this.defaultValue.toString();
}
} else if (this.type === '%n') {
suff = ' #';
}
return this.labelString + suff;
};