The ControlPanel piece, in the controlpanel.js file, has a private class, Control, to represent an individual control like a button, select, or text input. At time of writing, the Control class code has:
A _construct_button() method.
Checks like $.control === "button" in a few places.
There should instead be a subclass like Button that extends Control.
The code that instantiates controls, look for "new Control", should check the $.control value and instantiate the Button class instead.
The ControlPanel piece, in the controlpanel.js file, has a private class, Control, to represent an individual control like a button, select, or text input. At time of writing, the Control class code has:
_construct_button()
method.$.control === "button"
in a few places.There should instead be a subclass like Button that extends Control.
The code that instantiates controls, look for "new Control", should check the $.control value and instantiate the Button class instead.