Skip to content

Commit 7ebcb00

Browse files
committed
Make default starting out with one step
1 parent 200b773 commit 7ebcb00

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/blocks/mrc_steps.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ const STEPS = {
4040
* Block initialization.
4141
*/
4242
init: function (this: StepsBlock): void {
43-
this.mrcStepNames = [];
43+
this.mrcStepNames = ["0"];
4444
this.appendDummyInput()
4545
.appendField(Blockly.Msg.STEPS);
4646
/*
@@ -59,6 +59,7 @@ const STEPS = {
5959
this.setInputsInline(false);
6060
this.setStyle(MRC_STYLE_STEPS);
6161
this.setMutator(stepContainer.getMutatorIcon(this));
62+
this.updateShape_();
6263
},
6364
compose: function (this: StepsBlock, containerBlock: Blockly.Block) {
6465
if (containerBlock.type !== stepContainer.STEP_CONTAINER_BLOCK_NAME) {
@@ -85,9 +86,9 @@ const STEPS = {
8586
/**
8687
* mrcOnMutatorOpen is called when the mutator on an EventBlock is opened.
8788
*/
88-
mrcOnMutatorOpen: function(this: StepsBlock): void {
89+
mrcOnMutatorOpen: function(this: StepsBlock): void {
8990
stepContainer.onMutatorOpen(this);
90-
},
91+
},
9192
updateShape_: function (this: StepsBlock): void {
9293
// some way of knowing what was there before and what is there now
9394
let success = true;

0 commit comments

Comments
 (0)