1
0
mirror of https://github.com/s00500/ESPUI.git synced 2025-07-04 06:10:18 +00:00

Initial support for vertical switchers and sliders.

Documentation to be added in a later commit.
This commit is contained in:
Ian Gray
2022-01-21 23:30:08 +00:00
parent 9cd15db1ad
commit 334bf16b09
7 changed files with 99 additions and 51 deletions

View File

@ -855,6 +855,14 @@ void ESPUIClass::setPanelWide(uint16_t id, bool wide) {
}
}
void ESPUIClass::setVertical(uint16_t id, bool vert) {
Control* control = getControl(id);
if (control)
{
control->vertical = vert;
}
}
void ESPUIClass::updateControl(uint16_t id, int clientId)
{
Control* control = getControl(id);
@ -1097,6 +1105,8 @@ void ESPUIClass::prepareJSONChunk(AsyncWebSocketClient* client, uint16_t startin
item["elementStyle"] = String(control->elementStyle);
if (control->wide == true)
item["wide"] = true;
if (control->vertical == true)
item["vertical"] = true;
if (control->parentControl != Control::noParent)
{