Boolean slot refactorings in blocks.js

pull/95/head
jmoenig 2020-04-29 15:50:43 +02:00
rodzic 5e2c1edd51
commit 783de02b8b
1 zmienionych plików z 5 dodań i 9 usunięć

Wyświetl plik

@ -9896,15 +9896,15 @@ BooleanSlotMorph.prototype.toggleValue = function () {
this.progress = 3; this.progress = 3;
this.rerender(); this.rerender();
this.nextSteps ([ this.nextSteps ([
function () { () => {
this.progress = 2; this.progress = 2;
this.rerender(); this.rerender();
}, },
function () { () => {
this.progress = 1; this.progress = 1;
this.rerender(); this.rerender();
}, },
function () { () => {
this.progress = 0; this.progress = 0;
this.rerender(); this.rerender();
}, },
@ -9982,9 +9982,7 @@ BooleanSlotMorph.prototype.mapTrueToCode = function () {
// private - open a dialog box letting the user map code via the GUI // private - open a dialog box letting the user map code via the GUI
new DialogBoxMorph( new DialogBoxMorph(
this, this,
function (code) { code => StageMorph.prototype.codeMappings['true'] = code,
StageMorph.prototype.codeMappings['true'] = code;
},
this this
).promptCode( ).promptCode(
'Code mapping - true', 'Code mapping - true',
@ -9997,9 +9995,7 @@ BooleanSlotMorph.prototype.mapFalseToCode = function () {
// private - open a dialog box letting the user map code via the GUI // private - open a dialog box letting the user map code via the GUI
new DialogBoxMorph( new DialogBoxMorph(
this, this,
function (code) { code => StageMorph.prototype.codeMappings['false'] = code,
StageMorph.prototype.codeMappings['false'] = code;
},
this this
).promptCode( ).promptCode(
'Code mapping - false', 'Code mapping - false',