Skip to content

Commit

Permalink
[update] add default values for layout cell configs
Browse files Browse the repository at this point in the history
  • Loading branch information
mafanya23 committed Nov 15, 2023
1 parent 7d2376d commit 8db666f
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 5 deletions.
2 changes: 2 additions & 0 deletions docs/layout/api/cell/layout_cell_align_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: You can explore the align config of Layout in the documentation of

@signature: {'align?: "start" | "center" | "end" | "between" | "around" | "evenly";'}

@default: "start"

@example:
const layout = dhx.Layout("layout_container", {
rows: [
Expand Down
2 changes: 2 additions & 0 deletions docs/layout/api/cell/layout_cell_collapsable_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: You can explore the collapsable config of Layout in the documentati

@signature: {'collapsable?: boolean;'}

@default: false

@example:
const layout = new dhx.Layout("layout_container", {
cols: [
Expand Down
2 changes: 2 additions & 0 deletions docs/layout/api/cell/layout_cell_collapsed_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: You can explore the collapsed config of Layout in the documentation

@signature: {'collapsed?: boolean;'}

@default: false

@example:
const layout = new dhx.Layout("layout_container", {
cols: [
Expand Down
4 changes: 3 additions & 1 deletion docs/layout/api/cell/layout_cell_gravity_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: You can explore the gravity config of Layout in the documentation o

@signature: {'gravity?: number | boolean;'}

@default: 1

@example:
const layout = dhx.Layout("layout_container", {
css: "dhx_widget--bordered",
Expand Down Expand Up @@ -48,7 +50,7 @@ const layout = dhx.Layout("layout_container", {

If you specify the property for a cell, its size will be adjusted regarding the sizes of the cells that are in the same row, within the same parent and have **gravity** in their configuration.

The negative number set as a value to the **gravity** property is equated to zero.
The negative number set as a value to the **gravity** property is equal to zero.

@changelog:
The property is updated in v7.0. For more information, see [Migration article](migration.md#65---70).
Expand Down
2 changes: 2 additions & 0 deletions docs/layout/api/cell/layout_cell_height_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const layout = new dhx.Layout("layout_container", {

**Related sample**: [Layout. Sizes](https://snippet.dhtmlx.com/miej9gb9)

### Autoheight for cells

Starting from v7.0, the height of a cell can be automatically adjusted to the height of its content. For that, set the **height** configuration option to *"content"*:

~~~js {5}
Expand Down
2 changes: 2 additions & 0 deletions docs/layout/api/cell/layout_cell_hidden_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: You can explore the hidden config of Layout in the documentation of

@signature: {'hidden?: boolean;'}

@default: false

@example:
const layout = new dhx.Layout("layout_container", {
cols: [
Expand Down
2 changes: 2 additions & 0 deletions docs/layout/api/cell/layout_cell_resizable_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ description: You can explore the resizable config of Layout in the documentation

@signature: {'resizable?: boolean;'}

@default: false

@example:
const layout = new dhx.Layout("layout_container", {
cols: [
Expand Down
6 changes: 4 additions & 2 deletions docs/layout/api/cell/layout_cell_type_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ description: You can explore the type config of rows and columns of Layout in th

@signature: {'type?: "line" | "wide" | "space" | "none";'}

@default: "none"

@example:
const layout = new dhx.Layout("layout_container", {
rows: [
{
type: "wide", // "line" | "wide" | "space" | "none"
type: "wide", // "line" | "space" | "none"
cols: [
{
html: "1",
Expand Down Expand Up @@ -58,7 +60,7 @@ const layout = new dhx.Layout("layout_container", {
</tr>
<tr>
<td><b>"none"</b></td>
<td>removes visible borders and space between cells</td>
<td>removes visible borders and space between cells (the default one)</td>
</tr>
</tbody>
</table>
Expand Down
2 changes: 2 additions & 0 deletions docs/layout/api/cell/layout_cell_width_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const layout = new dhx.Layout("layout_container", {

**Related sample**: [Layout. Sizes](https://snippet.dhtmlx.com/miej9gb9)

### Autowidth for cells

Starting from v7.0, the width of a cell can be automatically adjusted to the width of its content. For that, set the **width** configuration option to *"content"*:

~~~js {5}
Expand Down
6 changes: 4 additions & 2 deletions docs/layout/api/layout_type_config.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@ description: You can explore the type config of Layout in the documentation of t

@signature: {'type?: "line" | "wide" | "space" | "none";'}

@default: "none"

@example:
const layout = new dhx.Layout("layout_container", {
type: "space", // "line" | "wide" | "space" | "none"
type: "space", // "line" | "wide" | "none"
cols: [
{
html: "1"
Expand Down Expand Up @@ -46,7 +48,7 @@ const layout = new dhx.Layout("layout_container", {
</tr>
<tr>
<td><b>"none"</b></td>
<td>removes visible borders and space between cells</td>
<td>removes visible borders and space between cells, used by default</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 8db666f

Please sign in to comment.