diff --git a/core/renderers/common/info.ts b/core/renderers/common/info.ts index 9830e890a..fa44b7743 100644 --- a/core/renderers/common/info.ts +++ b/core/renderers/common/info.ts @@ -345,34 +345,34 @@ export class RenderInfo { /** * Decide whether to start a new row between the two Blockly.Inputs. * - * @param input The first input to consider - * @param lastInput The input that follows. - * @returns True if the next input should be rendered on a new row. + * @param currInput The current input. + * @param prevInput The previous input. + * @returns True if the current input should be rendered on a new row. */ - protected shouldStartNewRow_(input: Input, lastInput?: Input): boolean { + protected shouldStartNewRow_(currInput: Input, prevInput?: Input): boolean { // If this is the first input, just add to the existing row. // That row is either empty or has some icons in it. - if (!lastInput) { + if (!prevInput) { return false; } // If the previous input was an end-row input, then any following input // should always be rendered on the next row. - if (lastInput instanceof EndRowInput) { + if (prevInput instanceof EndRowInput) { return true; } // A statement input or an input following one always gets a new row. if ( - input instanceof StatementInput || - lastInput instanceof StatementInput + currInput instanceof StatementInput || + prevInput instanceof StatementInput ) { return true; } // Value inputs, dummy inputs, and any input following an external value // input get a new row if inputs are not inlined. if ( - input instanceof ValueInput || - input instanceof DummyInput || - lastInput instanceof ValueInput + currInput instanceof ValueInput || + currInput instanceof DummyInput || + prevInput instanceof ValueInput ) { return !this.isInline; } diff --git a/core/renderers/zelos/info.ts b/core/renderers/zelos/info.ts index 8748bcf5f..623f0a3b0 100644 --- a/core/renderers/zelos/info.ts +++ b/core/renderers/zelos/info.ts @@ -118,29 +118,29 @@ export class RenderInfo extends BaseRenderInfo { this.finalize_(); } - override shouldStartNewRow_(input: Input, lastInput: Input): boolean { + override shouldStartNewRow_(currInput: Input, prevInput: Input): boolean { // If this is the first input, just add to the existing row. // That row is either empty or has some icons in it. - if (!lastInput) { + if (!prevInput) { return false; } // If the previous input was an end-row input, then any following input // should always be rendered on the next row. - if (lastInput instanceof EndRowInput) { + if (prevInput instanceof EndRowInput) { return true; } // A statement input or an input following one always gets a new row. if ( - input instanceof StatementInput || - lastInput instanceof StatementInput + currInput instanceof StatementInput || + prevInput instanceof StatementInput ) { return true; } // Value, dummy, and end-row inputs get new row if inputs are not inlined. if ( - input instanceof ValueInput || - input instanceof DummyInput || - input instanceof EndRowInput + currInput instanceof ValueInput || + currInput instanceof DummyInput || + currInput instanceof EndRowInput ) { return !this.isInline || this.isMultiRow; }