Conversation
| - [`$swimlane`](#configure-editbar-for-swimlanes) - allows configuring Editbar controls for all elements with the [**swimlane**](/swimlanes/) type | ||
| - [`$line`](#configure-editbar-for-lines) allows configuring Editbar controls for all elements with the [**line**](/lines/) type | ||
| - [`$lineTitle`](#configure-editbar-for-line-titles) - allows configuring Editbar controls for all elements with the [**lineTitle**](/line_titles/) type | ||
| - The `colorpicker`, `spacer` and `button` controls are used for all the Diagram items with the `shape` type |
There was a problem hiding this comment.
@mafanya23 а нужно ли тут дробить текст на подразделы? Что мы этим хотели показать?
There was a problem hiding this comment.
Хотела выделить, что базовые контролы настраиваются просто внутри свойства properties, а для комплексных нужно еще свойство $properties
| - [`$line`](#configure-editbar-for-lines) allows configuring Editbar controls for all elements with the [**line**](/lines/) type | ||
| - [`$lineTitle`](#configure-editbar-for-line-titles) - allows configuring Editbar controls for all elements with the [**lineTitle**](/line_titles/) type | ||
| - The `colorpicker`, `spacer` and `button` controls are used for all the Diagram items with the `shape` type | ||
| - The configs of the `colorpicker` and `button` controls are redefined especially for this type of Diagram items |
There was a problem hiding this comment.
@mafanya23 especially for this type - речь же идет про все типы фигур, а не конкретного типа, так?
There was a problem hiding this comment.
Да, наверное, здесь лучше написать especially for the $shape group of Diagram items, i.e. for all shapes
|
|
||
| ## Configure Editbar for shapes | ||
|
|
||
| ### Configuring Editbar for shapes |
There was a problem hiding this comment.
@mafanya23 хотелось бы дополнить этот раздел описанием, и сам пример по аналогии с примерами выше/ниже, то есть код целиком.
|
|
||
| **Related sample:** [Diagram Editor. Default mode. PERT сhart with the legend](https://snippet.dhtmlx.com/w8mrh3ay?mode=js) | ||
|
|
||
| ### Configuring Editbar for the grid area |
There was a problem hiding this comment.
@mafanya23 хотелось бы дополнить этот раздел описанием, и сам пример по аналогии с примерами выше/ниже, то есть код целиком.
| **Related complex controls:** [Border](/api/diagram_editor/editbar/complex_controls/border/), [Arrange](/api/diagram_editor/editbar/complex_controls/arrange/), [Position](/api/diagram_editor/editbar/complex_controls/position/), [Size](/api/diagram_editor/editbar/complex_controls/size/), [Text align](/api/diagram_editor/editbar/complex_controls/textalign/), [Text style](/api/diagram_editor/editbar/complex_controls/textstyle/) | ||
|
|
||
| ## Configure Editbar for group elements | ||
| ### Configuring Editbar for group elements |
There was a problem hiding this comment.
@mafanya23 хотелось бы дополнить этот раздел описанием, и сам пример по аналогии с примерами выше/ниже, то есть код целиком.
| **Related complex controls:** [Border](/api/diagram_editor/editbar/complex_controls/border/), [Arrange](/api/diagram_editor/editbar/complex_controls/arrange/), [Header](/api/diagram_editor/editbar/complex_controls/header/), [Header common](/api/diagram_editor/editbar/complex_controls/headercommon/), [Header position](/api/diagram_editor/editbar/complex_controls/headerposition/), [Size](/api/diagram_editor/editbar/complex_controls/size/), [Text align](/api/diagram_editor/editbar/complex_controls/textalign/), [Text style](/api/diagram_editor/editbar/complex_controls/textstyle/) | ||
|
|
||
| ## Configure Editbar for lines | ||
| ### Configuring Editbar for lines |
There was a problem hiding this comment.
@mafanya23 хотелось бы дополнить этот раздел описанием, и сам пример по аналогии с примерами выше/ниже, то есть код целиком.
| **Related complex controls:** [Border](/api/diagram_editor/editbar/complex_controls/border/), [Line shape](/api/diagram_editor/editbar/complex_controls/lineshape/), [Pointer view](/api/diagram_editor/editbar/complex_controls/pointerview/) | ||
|
|
||
| ## Configure Editbar for line titles | ||
| ### Configuring Editbar for line titles |
There was a problem hiding this comment.
@mafanya23 хотелось бы дополнить этот раздел описанием, и сам пример по аналогии с примерами выше/ниже, то есть код целиком.
| There is a possibility to create an Editbar that will dynamically change depending on certain conditions, e.g.: | ||
| the selected shape type, absence of selected items, the properties of the selected item. Check the example: | ||
|
|
||
| ~~~jsx |
There was a problem hiding this comment.
@mafanya23 этот пример не про динамическое отображение Editbar, скорей про базовую конфигурацию и переопределение определенных типов элементов (фигур)
| To make a dynamic Editbar that will change *depending on the properties of a selected shape*, you need to specify a function as a value of the property that defines the [type of a shape](/shapes/default_shapes/) or a [group of items](/guides/items_index/) within the [`properties`](api/diagram_editor/editbar/config/properties_property.md) configuration object: | ||
|
|
||
| ~~~jsx | ||
| editbar: { |
There was a problem hiding this comment.
@mafanya23 тут можно привести весь конфиг, он не большой. При этом было бы не плохо описать, что происходит в примере. Если очень кратко, то метод hasOwnProperty проверяет на наличие в объекте собственного свойства, указанного в качестве аргумента. И когда условие выполняется, мы отображаем определенный контрол. Например, в объекте есть свойство title, тогда мы отобразим контрол, который будет отвечать за отображение/изменение данного свойства. С остальными по аналогии, будет так же.
There was a problem hiding this comment.
Заметил описание есть пониже, возможно стоит чуть больше разбавить?)
|
|
||
| In the above example the `$shape` property is specified as a function that provides a set of default controls for all Diagram shapes and allows using additional controls, depending on whether a Diagram item has a particular property in its configuration. | ||
|
|
||
| ## Setting the width of Editbar |
There was a problem hiding this comment.
@mafanya23 в задаче есть еще два не плохих примера которые можно показать с описанием. Хотелось бы рассказать о них в гайде. Покажут как пользоваться сервисными свойствами.

There was a problem hiding this comment.
Там где про сервисные свойства, нужно таблички с предупреждениями показать дополнительно
There was a problem hiding this comment.
Добавила раздел Redefining service properties of basic controls в главу про создание кастомных контролов
No description provided.