A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.dhtmlx.com/suite/layout/api/cell/layout_cell_gravity_config/ below:

JavaScript Layout - gravity Config

Optional. Sets the "weight" of a cell in relation to other cells placed in the same row and within one parent

const layout = dhx.Layout("layout_container", {
css: "dhx_widget--bordered",
rows: [
{
id: "1",
cols: [
{
id: "1.1",
css: "dhx_layout-cell--border_left dhx_layout-cell--border_right",
html: "1.1",
gravity: 2
},
{
id: "1.2",
css: "dhx_layout-cell--border_left dhx_layout-cell--border_right",
html: "1.2",
gravity: 1
},
{
id: "1.3",
css: "dhx_layout-cell--border_left dhx_layout-cell--border_right",
html: "1.3",
gravity: 3
}
]
}
]
});

Related sample: Layout. Gravity

note

You can use the gravity property only when a cell has no specified sizes - width and height, otherwise - the property does not work.

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 equal to zero.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4