dasher-project / dasher-web

Dasher text entry in HTML, CSS, JavaScript, and SVG
https://dasher-project.github.io/dasher-web/browser/
MIT License
45 stars 8 forks source link

Control subclass for button #10

Open sjjhsjjh opened 4 years ago

sjjhsjjh commented 4 years ago

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:

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.