Skip to content
Merged

Next #85

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
6 changes: 3 additions & 3 deletions docs/api/cell_manager/add_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: You can learn about the add method of Cell Manager in the documenta
# add()

:::info
The **add()** method is automatically validated by the system. The cell won't be added if it is not possible according to the structure of the swimlane.
The `add()` method is automatically validated by the system. The cell won't be added if it is not possible according to the structure of the swimlane.
:::

### Description
Expand All @@ -26,7 +26,7 @@ add(
### Parameters

- `cellIndex` - (required) the start index of a cell in a layout. The count of the index starts from 0
- `dir` - (required) the direction of the action: "up" | "down" | "left" | "right"
- `dir` - (required) the direction of the action: `"up"` | `"down"` | `"left"` | `"right"`

### Example

Expand All @@ -44,4 +44,4 @@ diagram.cellManager.add(0, "down"); // adds cells as rows

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/aftercellsadd_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ diagram.events.on("afterCellsAdd", (swimlaneId) => {

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/aftercellsmove_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ diagram.events.on("afterCellsMove", (swimlaneId) => {

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/aftercellsremove_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ diagram.events.on("afterCellsRemove", (swimlaneId) => {

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/aftercellsvalidation_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ diagram.events.on("afterCellsValidation", (swimlaneId, validate, action) => {

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/beforecellsadd_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ diagram.events.on("beforeCellsAdd", (swimlaneId) => {

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/beforecellsmove_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ diagram.events.on("beforeCellsMove", (swimlaneId) => {

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/beforecellsremove_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ diagram.events.on("beforeCellsRemove", (swimlaneId) => {

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/beforecellsvalidation_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ diagram.events.on("beforeCellsValidation", (swimlaneId, action) => {

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
4 changes: 2 additions & 2 deletions docs/api/cell_manager/getcellid_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ getCellId(
### Parameters

- `cellIndex` - (required) the start index of a cell in a layout. The count of the index starts from 0
- `type` - (required) the type of direction to count the index: "row" | "col"
- `type` - (required) the type of direction to count the index: `"row"` | `"col"`

### Returns

Expand All @@ -46,4 +46,4 @@ diagram.cellManager.getCellId(0, "row"); // -> "r01"

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
4 changes: 2 additions & 2 deletions docs/api/cell_manager/getcellindex_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ getCellIndex(
### Parameters

- `cellId` - (required) the id of a cell
- `type` - (required) the type of direction to count the index: "row" | "col"
- `type` - (required) the type of direction to count the index: `"row"` | `"col"`

### Returns

Expand All @@ -46,4 +46,4 @@ diagram.cellManager.getCellIndex("r01", "row"); // -> 0

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/getsubheadercellid_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ diagram.cellManager.getSubHeaderCellId("sub01"); // -> "r01"

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/getsubheadercellindex_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ diagram.cellManager.getSubHeaderCellIndex("sub01"); // -> 0

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
4 changes: 2 additions & 2 deletions docs/api/cell_manager/getsubheadertype_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ getSubHeaderType(subheaderId: string): "row" | "col" | undefined;

### Returns

The method returns the type of the subheader of the swimlane: "row" | "col" | undefined
The method returns the type of the subheader of the swimlane: `"row"` | `"col"` | undefined

### Example

Expand All @@ -42,4 +42,4 @@ diagram.cellManager.getSubHeaderType("sub01"); // -> "row"

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: You can have an overview of CellManager in the documentation of the

# CellManager overview

The DHTMLX Diagram library provides you with a set of APIs to manipulate [a swimlane and its cells](../../swimlanes/) dynamically. The API can be used both in the diagram and in the editor.
The DHTMLX Diagram library provides you with a set of APIs to manipulate [a swimlane and its cells](/swimlanes/) dynamically. The API can be used both in the diagram and in the editor.

## Methods

Expand Down
6 changes: 3 additions & 3 deletions docs/api/cell_manager/move_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: You can learn about the move method of Cell Manager in the document
# move()

:::info
The **move()** method is automatically validated by the system. The cell won't be moved if it is not possible according to the structure of the swimlane.
The `move()` method is automatically validated by the system. The cell won't be moved if it is not possible according to the structure of the swimlane.
:::

### Description
Expand All @@ -26,7 +26,7 @@ move(
### Parameters

- `cellIndex` - (required) the start index of a cell in a layout. The count of the index starts from 0
- `dir` - (required) the direction of the action: "up" | "down" | "left" | "right"
- `dir` - (required) the direction of the action: `"up"` | `"down"` | `"left"` | `"right"`

### Example

Expand All @@ -44,4 +44,4 @@ diagram.cellManager.move(0, "down"); // moves cells as rows

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
4 changes: 2 additions & 2 deletions docs/api/cell_manager/remove_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: You can learn about the remove method of Cell Manager in the docume
# remove()

:::info
The **remove()** method is automatically validated by the system. The cell won't be removed if it is not possible according to the structure of the swimlane.
The `remove()` method is automatically validated by the system. The cell won't be removed if it is not possible according to the structure of the swimlane.
:::

### Description
Expand Down Expand Up @@ -44,4 +44,4 @@ diagram.cellManager.remove(0, "row"); // removes cells as rows

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/resetswimlane_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ diagram.cellManager.resetSwimlane(); // resets active swimlane

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/cell_manager/setswimlane_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ diagram.cellManager.setSwimlane("main"); // sets active swimlane

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
6 changes: 3 additions & 3 deletions docs/api/cell_manager/validation_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ validation(
### Parameters

- `cellIndex` - (required) the start index of a cell in a layout. The count of the index starts from 0
- `dir` - (required) the direction of the action: "up" | "down" | "left" | "right"
- `action` - (required) the type of the action: "move" | "remove" | "add"
- `dir` - (required) the direction of the action: `"up"` | `"down"` | `"left"` | `"right"`
- `action` - (required) the type of the action: `"move"` | `"remove"` | `"add"`

### Returns

Expand All @@ -48,4 +48,4 @@ diagram.cellManager.validation(0, "down", "move"); // -> true

**Change log**: Added in v4.0

**Related articles**: [Configuring Swimlanes](../../../swimlanes/)
**Related articles**: [Configuring Swimlanes](/swimlanes/)
2 changes: 1 addition & 1 deletion docs/api/data_collection/add_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ diagram.data.add({ type: "card", id: "3.2", text: "New Item" });
diagram.data.add({ type: "line", from: "3", to: "3.2" });
~~~

**Related articles**: [Adding an item](../../../guides/manipulating_items/#adding-an-item)
**Related articles**: [Adding an item](guides/manipulating_items.md#adding-an-item)

**Related sample**: [Diagram. Data. Add/delete item](https://snippet.dhtmlx.com/8wi20uop)
2 changes: 1 addition & 1 deletion docs/api/data_collection/change_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ change: (
The callback of the event takes the following parameters:

- `id` - (optional) the id of the changed item
- `status` - (optional) the status of the change: "add", "update", "delete", "load"
- `status` - (optional) the status of the change: `"add"`, `"update"`, `"delete"`, `"load"`
- `updatedItem` - (optional) the object of the changed item

:::info
Expand Down
6 changes: 3 additions & 3 deletions docs/api/data_collection/filter_event.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ filter: (filter?: object) => void;

### Parameters

The callback of the **filter** event is called with the following parameter:
The callback of the `filter` event is called with the following parameter:

- `object: {key: object }` - an object with all the active filters, where
- `key` - the id of an active filter
- `object` - an object with the [**rule** and **config** properties](api/data_collection/filter_method.md#parameters)
- `object` - an object with the [`rule` and `config` properties](api/data_collection/filter_method.md#parameters)

:::info
For handling the inner events of Diagram Data Collection you can use the **on()** method.
For handling the inner events of Diagram Data Collection you can use the `on()` method.
:::

### Example
Expand Down
4 changes: 2 additions & 2 deletions docs/api/data_collection/filter_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ filter(
- `config` - (optional) an object which defines the parameters of filtering. The object may contain the following properties:
- `id` - (optional) the id of the filter
- `add` - (optional) defines whether each next filtering will be applied to the already filtered data (<i>true</i>), or to the initial data (<i>false</i>, default)
- `permanent` - (optional) *true* to make the current filter permanent. It will be applied even if the next filtering doesn't have the `add:true` property in its configuration object. Such a filter can be removed just with the [***resetFilter***()](api/data_collection/resetfilter_method.md) method
- `permanent` - (optional) *true* to make the current filter permanent. It will be applied even if the next filtering doesn't have the `add:true` property in its configuration object. Such a filter can be removed just with the [`resetFilter()`](api/data_collection/resetfilter_method.md) method

### Example

Expand All @@ -77,7 +77,7 @@ To revert the diagram to the initial state, call the `filter()` method without p
diagram.data.filter();
~~~

**Related articles**: [Filtering items](../../../guides/manipulating_items/#filtering-items)
**Related articles**: [Filtering items](guides/manipulating_items.md#filtering-items)

**Related sample**: [Diagram. Data. Filtering shapes](https://snippet.dhtmlx.com/tm43bsgn)

Expand Down
2 changes: 1 addition & 1 deletion docs/api/data_collection/find_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ const shape = diagram.data.find((shape) => {
});
~~~

**Related articles**: [Finding the necessary item](../../../guides/manipulating_items/#finding-the-necessary-item)
**Related articles**: [Finding the necessary item](guides/manipulating_items.md#finding-the-necessary-item)

**Related sample**: [Diagram. Data. Finding necessary shape](https://snippet.dhtmlx.com/sete9z73)
2 changes: 1 addition & 1 deletion docs/api/data_collection/findall_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@ const shapes = diagram.data.findAll(function (shapes) {
});
~~~

**Related articles**: [Finding the necessary item](../../../guides/manipulating_items/#finding-the-necessary-item)
**Related articles**: [Finding the necessary item](guides/manipulating_items.md#finding-the-necessary-item)
2 changes: 1 addition & 1 deletion docs/api/data_collection/getfilters_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ getFilters({ permanent?: boolean }): object;

The method returns an object with the applied filters, where:
- `key` - the id of a filter
- `value` - an object with the [**rule** and **config** properties](/api/data_collection/filter_method.md#parameters)
- `value` - an object with the [`rule` and `config` properties](api/data_collection/filter_method.md#parameters)

### Example

Expand Down
2 changes: 1 addition & 1 deletion docs/api/data_collection/getitem_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@ const shape = diagram.data.getItem(123);
const text = shape.text;
~~~

**Related articles**: [Getting an item](../../../guides/manipulating_items/#getting-an-item)
**Related articles**: [Getting an item](guides/manipulating_items.md#getting-an-item)
6 changes: 3 additions & 3 deletions docs/api/data_collection/load_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ load(

### Parameters

- `url` - (required) the URL of an external file or DataProxy with the URL configured
- `driver` - (optional) DataDriver or type of data ("json", "csv", "xml"), "json" by default
- `url` - (required) the URL of an external file or `DataProxy` with the URL configured
- `driver` - (optional) `DataDriver` or type of data (`"json"`, `"csv"`, `"xml"`), `"json"` by default

### Returns

Expand Down Expand Up @@ -51,6 +51,6 @@ diagram.data.load("../some/data").then(() => {
});
~~~

**Related articles**: [Loading and storing data](../../../guides/loading_data/)
**Related articles**: [Loading and storing data](guides/loading_data.md)

**Related sample**: [Diagram. Data. Data loading](https://snippet.dhtmlx.com/09isp2d8)
6 changes: 3 additions & 3 deletions docs/api/data_collection/parse_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@ parse(
data: object[]; // an array of all shapes and connections
~~~
- for the PERT Diagram mode it is an object with:
- the `data` array (for shapes: "task", "milestone", "project")
- the `data` array (for shapes: `"task"`, `"milestone"`, `"project"`)
- the `links` array (for connections between shapes)
~~~jsx
{
data: object[]; // an array of shapes (tasks, milestones, projects)
links: object[] // an array of connections between the shapes
};
~~~
- `driver` - (optional) DataDriver or type of data ("json", "csv", "xml"), "json" by default
- `driver` - (optional) `DataDriver` or type of data (`"json"`, `"csv"`, `"xml"`), `"json"` by default

### Example

Expand Down Expand Up @@ -97,7 +97,7 @@ const diagram = new dhx.Diagram("diagram_container", {
diagram.data.parse(dataset);
~~~

**Related articles**: [Loading and storing data](../../../guides/loading_data/)
**Related articles**: [Loading and storing data](guides/loading_data.md)

**Related samples**:
- [Diagram. Org chart mode. Basic initialization](https://snippet.dhtmlx.com/5ign6fyy)
Expand Down
4 changes: 2 additions & 2 deletions docs/api/data_collection/remove_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: You can learn about the remove method of data collection in the doc
@short: Deletes the specified item from the diagram

:::note
If the diagram is initialized in the org (*type: "org"*) or mindmap (*type: "mindmap"*) mode, deleting a shape will remove the link to this shape and all child shapes as well
If the diagram is initialized in the org (`type: "org"`) or mindmap (`type: "mindmap"`) mode, deleting a shape will remove the link to this shape and all child shapes as well
:::

### Usage
Expand All @@ -35,6 +35,6 @@ diagram.data.parse(data);
diagram.data.remove("2");
~~~

**Related articles**: [Deleting items](../../../guides/manipulating_items/#deleting-items)
**Related articles**: [Deleting items](guides/manipulating_items.md#deleting-items)

**Related sample**: [Diagram. Data. Add/delete item](https://snippet.dhtmlx.com/8wi20uop)
2 changes: 1 addition & 1 deletion docs/api/data_collection/removeall_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ diagram.data.parse(data);
diagram.data.removeAll();
~~~

**Related articles**: [Deleting items](../../../guides/manipulating_items/#deleting-items)
**Related articles**: [Deleting items](guides/manipulating_items.md#deleting-items)

**Related sample**: [Diagram. Data. Add/delete item](https://snippet.dhtmlx.com/8wi20uop)
2 changes: 1 addition & 1 deletion docs/api/data_collection/resetfilter_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ resetFilter({

### Parameters

- `config` - (optional) specifies the parameters of resetting the active filters. If the config isn't specified or it is empty, all the filters except for those that have the ***permanent*** property in the configuration object will be reset. Can contain the following properties:
- `config` - (optional) specifies the parameters of resetting the active filters. If the config isn't specified or it is empty, all the filters except for those that have the `permanent` property in the configuration object will be reset. Can contain the following properties:
- `id` - (optional) the id of the filter to reset
- `permanent` - (optional) *true* to reset all the active filters, including those that have the `permanent:true` setting in their config

Expand Down
6 changes: 3 additions & 3 deletions docs/api/data_collection/serialize_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Depending on the diagram mode, the method returns:

- `object[]` - (for the default, org chart and mindmap Diagram modes) an array of objects for each item and link from Diagram
- `{ data: object[]; links: object[] }` - (for the PERT Diagram mode) an object with:
- the `data` array of objects (for shapes: "task", "milestone", "project")
- the `data` array of objects (for shapes: `"task"`, `"milestone"`, `"project"`)
- the `links` array of objects (for connections between shapes)

### Example
Expand All @@ -49,6 +49,6 @@ diagram.data.parse(dataset);
const dataset = diagram.data.serialize(); // -> { data: [...], links: [...] };
~~~

Note that for the PERT Diagram mode the *links* objects in the exported data object will have [the same types as in the DHTMLX Gantt chart](https://docs.dhtmlx.com/gantt/desktop__link_properties.html). It means that if the type of a link in the Diagram data coincides with some of the Gantt links types, it will remain the same during serialization. If the link type isn't specified or set differently (for example, `type: "line"`), it will be converted into `type: "0"`.
Note that for the PERT Diagram mode the `links` objects in the exported data object will have [the same types as in the DHTMLX Gantt chart](https://docs.dhtmlx.com/gantt/desktop__link_properties.html). It means that if the type of a link in the Diagram data coincides with some of the Gantt links types, it will remain the same during serialization. If the link type isn't specified or set differently (for example, `type: "line"`), it will be converted into `type: "0"`.

**Related articles**: [Saving and restoring state](../../../guides/loading_data/#saving-and-restoring-state)
**Related articles**: [Saving and restoring state](guides/loading_data.md#saving-and-restoring-state)
2 changes: 1 addition & 1 deletion docs/api/data_collection/update_method.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ diagram.data.parse(data);
diagram.data.update(123, { text:"New text" });
~~~

**Related articles**: [Updating an item](../../../guides/manipulating_items/#updating-an-item)
**Related articles**: [Updating an item](guides/manipulating_items.md#updating-an-item)
Loading
Loading