Перейти к содержанию

Навигация

SVG-Dashboards/en: различия между версиями

Новая страница: «To associate an image svg element with values or events, select it with the mouse, after which fields for setting the element's behavior will appear next to the image. {{SupportedSinceRelease | release = wb-2307 |content= In addition to selecting a single element, you can select a group. To do this, hold down the Alt key on your keyboard and click on one of the elements of the group. The group containing the element will be highlighted. Clicking again while...»
(Новая страница: «Once uploaded, the image will be displayed on the open page: # Specify links and behavior of svg elements using link editor. # Save the changes and see the result by clicking on the '''Demo''' button.»)
(Новая страница: «To associate an image svg element with values or events, select it with the mouse, after which fields for setting the element's behavior will appear next to the image. {{SupportedSinceRelease | release = wb-2307 |content= In addition to selecting a single element, you can select a group. To do this, hold down the Alt key on your keyboard and click on one of the elements of the group. The group containing the element will be highlighted. Clicking again while...»)
Строка 121: Строка 121:
The image is prepared in an external vector editor, but the assignment of links to elements is done in the controller web interface.
The image is prepared in an external vector editor, but the assignment of links to elements is done in the controller web interface.


<div lang="ru" dir="ltr" class="mw-content-ltr">
To associate an image svg element with values or events, select it with the mouse, after which fields for setting the element's behavior will appear next to the image.
Чтобы связать svg-элемент изображения со значениями или событиями, выберите его мышкой, после этого рядом с изображением появятся поля настройки поведения элемента.
{{SupportedSinceRelease
{{SupportedSinceRelease
| release = wb-2307
| release = wb-2307
|content=
|content=
Кроме выделения одиночного элемента, можно выделять группу. Для этого зажмите на клавиатуре клавишу Alt и кликните по одному из элементов группы. Будет выделена группа, куда входит элемент. Повторный клик при зажатой клавише Alt выберет группу уровнем выше и так далее до самого верха иерархии.
In addition to selecting a single element, you can select a group. To do this, hold down the Alt key on your keyboard and click on one of the elements of the group. The group containing the element will be highlighted. Clicking again while holding down the Alt key will select the group one level higher and so on up to the very top of the hierarchy.
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
Groups are convenient to use for creating buttons: we combined a rectangle and an icon in the editor and got a button.
Группы удобно использовать для создания кнопок: объединили в редакторе прямоугольник и иконку и получилась кнопка.
}}
}}
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
After setting up all connections, click the '''Save''' button.
После настройки всех связи нажмите кнопку '''Сохранить'''.
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
=== Read ===
=== Чтение ===
Display values from the source in a text field.
Отображение значений из источника в текстовом поле.
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
The value from the source selected in the '''Channel''' field is placed in the '''val''' variable, which must be specified in the '''Value''' field.
Значение из выбранного в поле '''Канал''' источника помещается в переменную '''val''', которую нужно указать в поле '''Значение'''.
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
To display the value, just specify the variable:
Чтобы вывести значение, просто укажите переменную:
<syntaxhighlight lang="javascript">  
<syntaxhighlight lang="javascript">
val
val
</syntaxhighlight>
</syntaxhighlight>
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
You can add arbitrary text to the value, for example, the unit of measure:
К значению можно добавить произвольный текст, например, единицу измерения:
<syntaxhighlight lang="javascript">  
<syntaxhighlight lang="javascript">
val + '°C'
val + ' °C'
</syntaxhighlight>
</syntaxhighlight>
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
You can also change the received value, for example, replace it with a human-readable status:
Также можно подменить полученное значение, например, заменить его на понятный человеку статус:
<syntaxhighlight lang="javascript">  
<syntaxhighlight lang="javascript">
(val == 1) ? 'ON' : 'OFF'
(val == 1) ? 'ВКЛ' : 'ОТКЛ'
</syntaxhighlight>
</syntaxhighlight>
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
=== Write to channel ===
=== Запись в канал ===
With this setting you can write a value to the topic when the user clicks on the element.
С помощью этой настройки вы можете записать значение в топик при клике пользователя по элементу.
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
There are two states ON and OFF. When a user clicks on an element, the value in the MQTT topic will change to the opposite.
Доступно два состояния ON и OFF. При клике пользователя на элементе, значение в MQTT-топике будет меняться на противоположное.
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
In the '''Channel''' field, select the MQTT topic for writing values, and in the '''On State Value''' and '''Off State Value''' fields specify which values correspond to the states.
Выберите в поле '''Канал''' MQTT топик для записи значений, а в полях '''Значение включенного состояния''' и '''Значение выключенного состояния''' укажите какие значения соответствуют состояниям.
</div>


<div lang="ru" dir="ltr" class="mw-content-ltr">
<div lang="ru" dir="ltr" class="mw-content-ltr">