summaryrefslogtreecommitdiff
path: root/scripts/main.js
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2024-11-19 02:10:49 -0500
committerKyle Gunger <kgunger12@gmail.com>2024-11-19 02:10:49 -0500
commit074fc672900cb569e530ce6edbceb0a086150fa1 (patch)
tree45f7853204c91a79a76e1cb2ca9a8397621f2ce9 /scripts/main.js
parent77adcd1b20528e6040ac3802b7d5ece769cebe32 (diff)
Refactor most Widget Parameters into setId rather than private variables
Diffstat (limited to 'scripts/main.js')
-rw-r--r--scripts/main.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/main.js b/scripts/main.js
index 0ed7fd1..51b7efb 100644
--- a/scripts/main.js
+++ b/scripts/main.js
@@ -8,8 +8,12 @@ class Client {
constructor (content)
{
/** @type {WidgetToggle} */
- this.toggle = new WidgetCheckbox();
+ this.cb = new WidgetCheckbox();
+ content.appendChild(this.cb.element);
+ this.toggle = new WidgetToggle();
content.appendChild(this.toggle.element);
+ this.button = new WidgetButton();
+ content.appendChild(this.button.element);
this.slider = new WidgetSlider();
content.appendChild(this.slider.element);
this.temp = new WidgetColorTemp();
@@ -18,13 +22,15 @@ class Client {
content.appendChild(this.light.element);
this.wheel = new WidgetColorWheel();
content.appendChild(this.wheel.element);
- this.therm = new WidgetThermostat({temp: 72, gague: 69});
+ this.therm = new WidgetThermostat(72, 69);
content.appendChild(this.therm.element);
this.sel_b = new WidgetSelectButton(2);
this.sel_b.addOption("Heat", "heat");
this.sel_b.addOption("Cool", "cool");
this.sel_b.addOption("Eco", "eco");
content.appendChild(this.sel_b.element);
+ this.scrubber = new WidgetScrubber();
+ content.appendChild(this.scrubber.element);
// content.appendChild(Widget("button").el);
// content.appendChild(Widget("checkbox").el);
// content.appendChild(Widget("slider").el);