16 343
правки
(Новая страница: «For example, if the value of the MQTT topic is equal to <code>1</code> , then print the value <code>ВКЛ</code> , otherwise — <code>ОТКЛ</code> : <syntaxhighlight lang="javascript"> (val == 1) ? 'ON' : 'OFF' </syntaxhighlight>») |
(Новая страница: «Events available: single and long press, as well as swipe left and right.») Метки: правка с мобильного устройства правка из мобильной версии |
||
Строка 184: | Строка 184: | ||
Here you can specify under what condition to show the image element. By default, the element will be hidden and displayed only while the condition is met. | Here you can specify under what condition to show the image element. By default, the element will be hidden and displayed only while the condition is met. | ||
In the '''Channel''' field, select the MQTT topic that the element will respond to, in the '''Condition''' field, select a condition, and in the '''Value''' field, select a value. | |||
=== Design style === | |||
== | Allows you to change the style of image elements. Can be used to create feedback for actions, notify the user about an event, etc. | ||
Element properties available for styling: | |||
* fill — fill color; | |||
* fill — | * fill-opacity — fill opacity, values from 0.0 to 1.0 or as a percentage; | ||
* fill-opacity — | * stroke — stroke color; | ||
* stroke — | * stroke- width — stroke thickness; | ||
* stroke-width — | * stroke-dasharray — dashed stroke type, set in units of length or percentage. | ||
* stroke-dasharray — | * stroke-opacity — stroke opacity, values from 0.0 to 1.0 or percentage. | ||
* stroke-opacity — | |||
Colors can be named <code>black, red, yellow и т.п.</code> or hex values <code>#ffe680ff, #4f4f4dff и т.п.</code> . | |||
Let's change the color of the element depending on the state of the relay, if the value in the topic is <code>1</code> , then paint the object yellow, otherwise - gray: | |||
<syntaxhighlight lang="javascript"> | |||
<syntaxhighlight lang="javascript"> | |||
(val == 1) ? ';fill: yellow' : ';fill: gray' | (val == 1) ? ';fill: yellow' : ';fill: gray' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Let's make it so that when the value is greater than 20, the stroke of the element becomes red, dotted and 2px thick. For values less than or equal to 20, the element style will be left by default: | |||
<syntaxhighlight lang="javascript"> | |||
<syntaxhighlight lang="javascript"> | |||
(val > 20) ? 'stroke: red; stroke-width:2px; stroke-dasharray:2,1' : '' | (val > 20) ? 'stroke: red; stroke-width:2px; stroke-dasharray:2,1' : '' | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== Editing == | |||
= | |||
=== Panel === | |||
To make changes: | |||
# Open the SVG panel. | |||
# | # Click on the '''Edit''' button. | ||
# | # Make changes and save them by clicking on the ' button ''Demonstration'''. | ||
# | |||
=== SVG Image === | |||
=== SVG | ==== Release wb-2307 and newer ==== | ||
==== | |||
{{SupportedSinceRelease | {{SupportedSinceRelease | ||
| release = wb-2307 | | release=wb-2307 | ||
|content= | |content= | ||
SVG panels use identifiers embedded in the file (the id tag), so to edit the panel, simply make changes to the drawing and upload the new version to the controller. | |||
Important! If you have made a binding to a group of elements, then do not ungroup this group! If you need to change it, just go to the group in Inkscape and add or remove elements. | |||
}} | }} | ||
<div lang="ru" dir="ltr" class="mw-content-ltr"> | <div lang="ru" dir="ltr" class="mw-content-ltr"> |