1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-06-02 10:03:26 +00:00
ESPUI/data/js
Ian Gray 232ca3ead4
Support for dynamic custom inline styling.
Adds two functions in ESPUI.h:
setPanelStyle()
setElementStyle()
These allow for custom inline CSS styles to be applied to the panel and to
the specific UI element repectively.

For example:

```
char stylecol1[30]
sprintf(stylecol1, "background-color: #%06X;", (unsigned int) random(0x0, 0xFFFFFF));
ESPUI.setPanelStyle(switch1, stylecol1);
```
This will set the panel of the given control to a random hex colour.

This is supported by both the initial UI message, and by control update messages, so you
can change these styles dynamically in response to other events.

setElementStyle() is not perfect. Because CSS inline styles can only style one specific
DOM element, for controls made up of multiple elements (like the "pad") this is limited.
I have tried to make an appropriate choice for each supported control.
2022-01-03 13:06:55 +01:00
..
controls.js Support for dynamic custom inline styling. 2022-01-03 13:06:55 +01:00
controls.min.js Support for dynamic custom inline styling. 2022-01-03 13:06:55 +01:00
graph.js remove graph logging 2019-12-27 20:27:10 +01:00
graph.min.js Add remControl() method for remove contols 2020-08-26 22:13:38 +02:00
slider.js Fixing sliders not updating properly 2020-08-26 22:16:02 +02:00
slider.min.js Fixing sliders not updating properly 2020-08-26 22:16:02 +02:00
tabbedcontent.js Added tabbedcontent.js (from https://github.com/elboletaire/tabbedcontent) 2019-03-03 23:27:11 +01:00
tabbedcontent.min.js Add remControl() method for remove contols 2020-08-26 22:13:38 +02:00
zepto.min.js Moved examples/gui/data to data/ and adjusted tools/*.py 2019-03-03 21:23:39 +01:00