renamed default special HOF parameters to "item, index, list"

and took out some commented-out code
pull/89/head
jmoenig 2019-11-02 12:59:00 +01:00
rodzic a5d10fcf0f
commit 74bab927a4
2 zmienionych plików z 5 dodań i 16 usunięć

Wyświetl plik

@ -3,13 +3,15 @@
## in development:
* **New Features:**
* expanding the rings in "map", "keep" and "find" shows 3 inputs named "item", "idx" and "data"
* limited expanding rings in special HOFs to 3 parameters
* **Notable Changes:**
* **Notable Fixes:**
* **Translation Updates:**
* German
### 2019-11-01
* blocks: limit expanding rings in special HOFs to 2 parameters
* blocks: limit expanding rings in special HOFs to 3 parameters
* blocks renamed default special HOF parameters to "item, index, list"
### 2019-11-01
* new dev version

Wyświetl plik

@ -11059,8 +11059,6 @@ MultiArgMorph.prototype.addInput = function (contents) {
var i, name,
newPart = this.labelPart(this.slotSpec),
idx = this.children.length - 1;
// wantMore = false;
// newPart.alpha = this.alpha ? 1 : (1 - this.alpha) / 2;
if (contents) {
newPart.setContents(contents);
} else if (this.elementSpec === '%scriptVars' ||
@ -11080,14 +11078,9 @@ MultiArgMorph.prototype.addInput = function (contents) {
if (this.is3ArgRingInHOF() && idx < 4) {
newPart.setContents([
localize('item'),
localize('idx'),
localize('data')
localize('index'),
localize('list')
][idx - 1]);
/* commented out for now
if (idx === 1) { // fully expand to 3 items
wantMore = true;
}
*/
} else {
newPart.setContents('#' + idx);
}
@ -11096,12 +11089,6 @@ MultiArgMorph.prototype.addInput = function (contents) {
this.children.splice(idx, 0, newPart);
newPart.drawNew();
this.fixLayout();
/* commented out for now
if (wantMore) { // expand to 3 inputs in certain HOFs
this.addInput();
this.addInput();
}
*/
};
MultiArgMorph.prototype.removeInput = function () {