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

Control subclass for selector

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_select() method.
  • Checks like $.control === "select" in a few places.

There should instead be a subclass like Selector that extends Control.

The code that instantiates controls, look for "new Control", should check the $.control value and instantiate the Selector class instead. (This is a simiilar issue to https://github.com/dasher-project/redash/issues/10 but for selector controls. The select is a bit more tricky because the HTML5 interface is a bit more involved.)

sjjhsjjh avatar Jul 05 '20 09:07 sjjhsjjh