diff --git a/core/block.ts b/core/block.ts index 7c7de425a..3e279f798 100644 --- a/core/block.ts +++ b/core/block.ts @@ -366,8 +366,8 @@ export class Block implements IASTNodeLocation, IDeletable { * change). */ initModel() { - for (let i = 0, input; (input = this.inputList[i]); i++) { - for (let j = 0, field; (field = input.fieldRow[j]); j++) { + for (const input of this.inputList) { + for (const field of input.fieldRow) { if (field.initModel) { field.initModel(); } diff --git a/core/field.ts b/core/field.ts index ba5478008..08aa28486 100644 --- a/core/field.ts +++ b/core/field.ts @@ -321,10 +321,8 @@ export abstract class Field /** * Create the block UI for this field. - * - * @internal */ - initView() { + protected initView() { this.createBorderRect_(); this.createTextElement_(); } @@ -332,8 +330,6 @@ export abstract class Field /** * Initializes the model of the field after it has been installed on a block. * No-op by default. - * - * @internal */ initModel() {} diff --git a/core/field_angle.ts b/core/field_angle.ts index 918b885da..49eb03b98 100644 --- a/core/field_angle.ts +++ b/core/field_angle.ts @@ -165,8 +165,6 @@ export class FieldAngle extends FieldInput { /** * Create the block UI for this field. - * - * @internal */ override initView() { super.initView(); diff --git a/core/field_checkbox.ts b/core/field_checkbox.ts index 44dea25fa..1b865feef 100644 --- a/core/field_checkbox.ts +++ b/core/field_checkbox.ts @@ -110,8 +110,6 @@ export class FieldCheckbox extends Field { /** * Create the block UI for this checkbox. - * - * @internal */ override initView() { super.initView(); diff --git a/core/field_colour.ts b/core/field_colour.ts index d5ea7ee80..359c9d713 100644 --- a/core/field_colour.ts +++ b/core/field_colour.ts @@ -163,8 +163,6 @@ export class FieldColour extends Field { /** * Create the block UI for this colour field. - * - * @internal */ override initView() { this.size_ = new Size( diff --git a/core/field_dropdown.ts b/core/field_dropdown.ts index 3f9465762..0390a1031 100644 --- a/core/field_dropdown.ts +++ b/core/field_dropdown.ts @@ -185,8 +185,6 @@ export class FieldDropdown extends Field { /** * Create the block UI for this dropdown. - * - * @internal */ override initView() { if (this.shouldAddBorderRect_()) { diff --git a/core/field_image.ts b/core/field_image.ts index 752ef3e78..7476498c9 100644 --- a/core/field_image.ts +++ b/core/field_image.ts @@ -29,13 +29,13 @@ export class FieldImage extends Field { */ private static readonly Y_PADDING = 1; protected override size_: Size; - private readonly imageHeight: number; + protected readonly imageHeight: number; /** The function to be called when this field is clicked. */ private clickHandler: ((p1: FieldImage) => void) | null = null; /** The rendered field's image element. */ - private imageElement: SVGImageElement | null = null; + protected imageElement: SVGImageElement | null = null; /** * Editable fields usually show some sort of UI indicating they are @@ -135,8 +135,6 @@ export class FieldImage extends Field { /** * Create the block UI for this image. - * - * @internal */ override initView() { this.imageElement = dom.createSvgElement( diff --git a/core/field_input.ts b/core/field_input.ts index ee6f66915..eb64d4493 100644 --- a/core/field_input.ts +++ b/core/field_input.ts @@ -141,7 +141,6 @@ export abstract class FieldInput extends Field< } } - /** @internal */ override initView() { const block = this.getSourceBlock(); if (!block) { diff --git a/core/field_label.ts b/core/field_label.ts index 9d3d98744..b67a10990 100644 --- a/core/field_label.ts +++ b/core/field_label.ts @@ -69,8 +69,6 @@ export class FieldLabel extends Field { /** * Create block UI for this label. - * - * @internal */ override initView() { this.createTextElement_(); diff --git a/core/field_multilineinput.ts b/core/field_multilineinput.ts index cb812b428..df7d0f331 100644 --- a/core/field_multilineinput.ts +++ b/core/field_multilineinput.ts @@ -152,8 +152,6 @@ export class FieldMultilineInput extends FieldTextInput { /** * Create the block UI for this field. - * - * @internal */ override initView() { this.createBorderRect_(); diff --git a/core/field_variable.ts b/core/field_variable.ts index 8c1fa54b6..419881fa4 100644 --- a/core/field_variable.ts +++ b/core/field_variable.ts @@ -130,8 +130,6 @@ export class FieldVariable extends FieldDropdown { * Initialize the model for this field if it has not already been initialized. * If the value has not been set to a variable by the first render, we make up * a variable rather than let the value be invalid. - * - * @internal */ override initModel() { const block = this.getSourceBlock();