dasher-web icon indicating copy to clipboard operation
dasher-web copied to clipboard

Control subclass for button

Open sjjhsjjh opened this issue 4 years ago • 0 comments

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.

sjjhsjjh avatar Jul 05 '20 09:07 sjjhsjjh