Skip to content

Commit f906ccf

Browse files
Constructor order.
1 parent f1c27c8 commit f906ccf

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/board/ui.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,13 @@ export class BoardUI {
7878
];
7979
this.pins = Array(33);
8080
this.pins[MICROBIT_HAL_PIN_FACE] = new PinUI(
81+
this.svg.querySelector("#Logo")!,
8182
"pinLogo",
82-
onSensorChange,
83-
this.svg.querySelector("#Logo")!
83+
onSensorChange
8484
);
85-
this.pins[MICROBIT_HAL_PIN_P0] = new PinUI("pin0", onSensorChange, null);
86-
this.pins[MICROBIT_HAL_PIN_P1] = new PinUI("pin1", onSensorChange, null);
87-
this.pins[MICROBIT_HAL_PIN_P2] = new PinUI("pin2", onSensorChange, null);
85+
this.pins[MICROBIT_HAL_PIN_P0] = new PinUI(null, "pin0", onSensorChange);
86+
this.pins[MICROBIT_HAL_PIN_P1] = new PinUI(null, "pin1", onSensorChange);
87+
this.pins[MICROBIT_HAL_PIN_P2] = new PinUI(null, "pin2", onSensorChange);
8888
this.audio = new AudioUI();
8989
this.temperature = new RangeSensor("temperature", -5, 50, 21, "°C");
9090
this.accelerometer = new AccelerometerUI(onSensorChange);
@@ -529,9 +529,9 @@ export class PinUI {
529529
private mouseLeaveListener: (e: MouseEvent) => void;
530530

531531
constructor(
532+
private element: SVGElement | null,
532533
label: string,
533-
private onSensorChange: () => void,
534-
private element: SVGElement | null
534+
private onSensorChange: () => void
535535
) {
536536
this.pin = new RangeSensor(label, 0, 1, 0, undefined);
537537
this.pin.onchange = (): void => {

0 commit comments

Comments
 (0)