mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-21 22:50:55 +00:00
Send visibility
Signed-off-by: Lukas Bachschwell <lukas@lbsfilm.at>
This commit is contained in:
parent
aa03c1683d
commit
c66f528702
@ -590,7 +590,7 @@ void onWsEvent(
|
||||
uint16_t ESPUIClass::addControl(ControlType type, const char* label, const String& value, ControlColor color,
|
||||
uint16_t parentControl, void (*callback)(Control*, int))
|
||||
{
|
||||
Control* control = new Control(type, label, callback, value, color, parentControl);
|
||||
Control* control = new Control(type, label, callback, value, color, true, parentControl);
|
||||
|
||||
if (this->controls == nullptr)
|
||||
{
|
||||
@ -755,6 +755,7 @@ void ESPUIClass::updateControl(Control* control, int clientId)
|
||||
root["type"] = (int)control->type + ControlType::UpdateOffset;
|
||||
root["value"] = control->value;
|
||||
root["id"] = control->id;
|
||||
root["visible"] = control->visible;
|
||||
root["color"] = (int)control->color;
|
||||
serializeJson(document, json);
|
||||
|
||||
@ -969,6 +970,7 @@ void ESPUIClass::jsonDom(AsyncWebSocketClient* client)
|
||||
item["label"] = control->label;
|
||||
item["value"] = String(control->value);
|
||||
item["color"] = (int)control->color;
|
||||
item["visible"] = (int)control->visible;
|
||||
|
||||
if (control->parentControl != Control::noParent)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user