Skip to content

Commit 8cf46e9

Browse files
committed
[update] grid blockselection module events' pages
1 parent 54bcb2f commit 8cf46e9

10 files changed

+189
-80
lines changed

docs/grid/api/blockselection/afterblockhandleapply_event.md

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,29 @@ afterBlockHandleApply: (
2222
@params:
2323
The callback of the event is called with the following parameters:
2424

25-
- `startCell` - an object that contains the initial cell of the selection, includes the following properties:
26-
- `row` - the row configuration object
27-
- `column`- the column configuration object
28-
- `endCell` - an object that contains the end cell of the selection, includes the following properties:
29-
- `row` - the row configuration object
30-
- `column`- the column configuration object
31-
- `dragDirection` - determines the direction of movement of the focused cell
32-
- `event` - the browser event: `MouseEvent` or `TouchEvent`
25+
<table>
26+
<tbody>
27+
<tr>
28+
<td><b>startCell</b></td>
29+
<td>(<i>object</i>) an object that contains the initial cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
30+
</tr>
31+
<tr>
32+
<td><b>endCell</b></td>
33+
<td>(<i>object</i>) an object that contains the end cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
34+
</tr>
35+
<tr>
36+
<td><b>dragDirection</b></td>
37+
<td>(<i>string</i>) determines the direction of movement of the focused cell: `"up"` | `"down"` | `"left"` | `"right"` | `null`</td>
38+
</tr>
39+
<tr>
40+
<td><b>event</b></td>
41+
<td>(<i>Event</i>) the browser event: `MouseEvent` or `TouchEvent`</td>
42+
</tr>
43+
</tbody>
44+
</table>
3345

3446
@example:
35-
grid.block.events.on("afterBlockHandleApply", (startCell, endCell, dragDirection) => {
47+
grid.block.events.on("afterBlockHandleApply", (startCell, endCell, dir) => {
3648
console.log("Handle applied:");
3749
});
3850

docs/grid/api/blockselection/afterblockselectionapply_event.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,26 @@ afterBlockSelectionApply: (
2222
@params:
2323
The callback of the event is called with the following parameters:
2424

25-
- `startCell` - an object that contains the initial cell of the selection, includes the following properties:
26-
- `row` - the row configuration object
27-
- `column`- the column configuration object
28-
- `endCell` - an object that contains the end cell of the selection, includes the following properties:
29-
- `row` - the row configuration object
30-
- `column`- the column configuration object
31-
- `handle` - indicates whether the handle was used (`true`) or a regular selection (`false`)
32-
- `event` - the browser event: `MouseEvent` or `TouchEvent`
33-
25+
<table>
26+
<tbody>
27+
<tr>
28+
<td><b>startCell</b></td>
29+
<td>(<i>object</i>) an object that contains the initial cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
30+
</tr>
31+
<tr>
32+
<td><b>endCell</b></td>
33+
<td>(<i>object</i>) an object that contains the end cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
34+
</tr>
35+
<tr>
36+
<td><b>handle</b></td>
37+
<td>(<i>boolean</i>) indicates whether the handle was used (`true`) or a regular selection (`false`)</td>
38+
</tr>
39+
<tr>
40+
<td><b>event</b></td>
41+
<td>(<i>Event</i>) the browser event: `MouseEvent` or `TouchEvent`</td>
42+
</tr>
43+
</tbody>
44+
</table>
3445

3546
@example:
3647
grid.block.events.on("afterBlockSelectionApply", (startCell, endCell) => {

docs/grid/api/blockselection/afterblockselectionmove_event.md

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,30 @@ afterBlockSelectionMove: (
2323
@params:
2424
The callback of the event is called with the following parameters:
2525

26-
- `startCell` - an object that contains the initial cell of the selection, includes the following properties:
27-
- `row` - the row configuration object
28-
- `column`- the column configuration object
29-
- `endCell` - an object that contains the current end cell of the selection, includes the following properties:
30-
- `row` - the row configuration object
31-
- `column`- the column configuration object
32-
- `focusCell` - an object that contains the focus cell (if the handle is used) or `null`, includes the following properties:
33-
- `row` - the row configuration object
34-
- `column`- the column configuration object
35-
- `dragDirection` - determines the direction of movement of the focused cell
36-
- `event` - the browser event: `MouseEvent` or `TouchEvent`
26+
<table>
27+
<tbody>
28+
<tr>
29+
<td><b>startCell</b></td>
30+
<td>(<i>object</i>) an object that contains the initial cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
31+
</tr>
32+
<tr>
33+
<td><b>endCell</b></td>
34+
<td>(<i>object</i>) an object that contains the current end cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
35+
</tr>
36+
<tr>
37+
<td><b>focusCell</b></td>
38+
<td>(<i>object</i>) an object that contains the focus cell (if the handle is used) or `null`, includes the following properties: <ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
39+
</tr>
40+
<tr>
41+
<td><b>dragDirection</b></td>
42+
<td>(<i>string</i>) determines the direction of movement of the focused cell: `"up"` | `"down"` | `"left"` | `"right"` | `null`</td>
43+
</tr>
44+
<tr>
45+
<td><b>event</b></td>
46+
<td>(<i>Event</i>) the browser event: `MouseEvent` or `TouchEvent`</td>
47+
</tr>
48+
</tbody>
49+
</table>
3750

3851
@example:
3952
grid.block.events.on("afterBlockSelectionMove", (startCell, endCell) => {

docs/grid/api/blockselection/beforeblockhandleapply_event.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,33 @@ beforeBlockHandleApply: (
2222
@params:
2323
The callback of the event is called with the following parameters:
2424

25-
- `startCell` - an object that contains the initial cell of the selection, includes the following properties:
26-
- `row` - the row configuration object
27-
- `column`- the column configuration object
28-
- `endCell` - an object that contains the end cell of the selection, includes the following properties:
29-
- `row` - the row configuration object
30-
- `column`- the column configuration object
31-
- `dragDirection` - determines the direction of movement of the focused cell
32-
- `event` - the browser event: `MouseEvent` or `TouchEvent`
25+
<table>
26+
<tbody>
27+
<tr>
28+
<td><b>startCell</b></td>
29+
<td>(<i>object</i>) an object that contains the initial cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
30+
</tr>
31+
<tr>
32+
<td><b>endCell</b></td>
33+
<td>(<i>object</i>) an object that contains the end cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
34+
</tr>
35+
<tr>
36+
<td><b>dragDirection</b></td>
37+
<td>(<i>string</i>) determines the direction of movement of the focused cell: `"up"` | `"down"` | `"left"` | `"right"` | `null`</td>
38+
</tr>
39+
<tr>
40+
<td><b>event</b></td>
41+
<td>(<i>Event</i>) the browser event: `MouseEvent` or `TouchEvent`</td>
42+
</tr>
43+
</tbody>
44+
</table>
3345

3446
@returns:
3547
Return `false` to cancel the action; otherwise, `true`.
3648

3749
@example:
38-
grid.block.events.on("beforeBlockHandleApply", (startCell, endCell, dragDirection) => {
39-
if (dragDirection === "right" | dragDirection === "left") {
50+
grid.block.events.on("beforeBlockHandleApply", (startCell, endCell, dir) => {
51+
if (dir === "right" | dir === "left") {
4052
console.log("Horizontal change canceled");
4153
return false;
4254
}

docs/grid/api/blockselection/beforeblockselectionapply_event.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,26 @@ beforeBlockSelectionApply: (
2222
@params:
2323
The callback of the event is called with the following parameters:
2424

25-
- `startCell` - an object that contains the initial cell of the selection, includes the following properties:
26-
- `row` - the row configuration object
27-
- `column`- the column configuration object
28-
- `endCell` - an object that contains the end cell of the selection, includes the following properties:
29-
- `row` - the row configuration object
30-
- `column`- the column configuration object
31-
- `handle` - indicates whether the handle was used (`true`) or a regular selection (`false`)
32-
- `event` - the browser event: `MouseEvent` or `TouchEvent`
25+
<table>
26+
<tbody>
27+
<tr>
28+
<td><b>startCell</b></td>
29+
<td>(<i>object</i>) an object that contains the initial cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
30+
</tr>
31+
<tr>
32+
<td><b>endCell</b></td>
33+
<td>(<i>object</i>) an object that contains the end cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
34+
</tr>
35+
<tr>
36+
<td><b>handle</b></td>
37+
<td>(<i>boolean</i>) indicates whether the handle was used (`true`) or a regular selection (`false`)</td>
38+
</tr>
39+
<tr>
40+
<td><b>event</b></td>
41+
<td>(<i>Event</i>) the browser event: `MouseEvent` or `TouchEvent`</td>
42+
</tr>
43+
</tbody>
44+
</table>
3345

3446
@returns:
3547
Return `false` to cancel the action; otherwise, `true`.

docs/grid/api/blockselection/beforeblockselectionmove_event.md

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,31 @@ beforeBlockSelectionMove: (
2323
@params:
2424
The callback of the event is called with the following parameters:
2525

26-
- `startCell` - an object that contains the initial cell of the selection, includes the following properties:
27-
- `row` - the row configuration object
28-
- `column`- the column configuration object
29-
- `nextCell` - an object that contains the next cell to which the boundary is moving or the end cell of the previously selected boundary during the handle movement, includes the following properties:
30-
- `row` - the row configuration object
31-
- `column`- the column configuration object
32-
- `focusCell` - an object that contains the last focus cell (if the handle is used) or `null`. The cell object includes the following properties:
33-
- `row` - the row configuration object
34-
- `column`- the column configuration object
35-
- `dragDirection` - determines the direction of movement of the focused cell
36-
- `event` - the browser event: `MouseEvent` or `TouchEvent`
26+
27+
<table>
28+
<tbody>
29+
<tr>
30+
<td><b>startCell</b></td>
31+
<td>(<i>object</i>) an object that contains the initial cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
32+
</tr>
33+
<tr>
34+
<td><b>nextCell</b></td>
35+
<td>(<i>object</i>) an object that contains the next cell to which the boundary is moving or the end cell of the previously selected boundary during the handle movement, includes the following properties: <ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
36+
</tr>
37+
<tr>
38+
<td><b>focusCell</b></td>
39+
<td>(<i>object</i>) an object that contains the last focus cell (if the handle is used) or `null`, includes the following properties: <ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
40+
</tr>
41+
<tr>
42+
<td><b>dragDirection</b></td>
43+
<td>(<i>string</i>) determines the direction of movement of the focused cell: `"up"` | `"down"` | `"left"` | `"right"` | `null`</td>
44+
</tr>
45+
<tr>
46+
<td><b>event</b></td>
47+
<td>(<i>Event</i>) the browser event: `MouseEvent` or `TouchEvent`</td>
48+
</tr>
49+
</tbody>
50+
</table>
3751

3852
@returns:
3953
Return `false` to cancel the action; otherwise, `true`.

docs/grid/api/blockselection/blockhandlemousedown_event.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ blockHandleMouseDown: (event: MouseEvent | TouchEvent) => void;
1515
~~~
1616

1717
@params:
18-
The callback of the event is called with the following parameters:
18+
The callback of the event is called with the following parameter:
1919

2020
- `event` - the browser event: `MouseEvent` or `TouchEvent`
2121

docs/grid/api/blockselection/blockselectionend_event.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,26 @@ blockSelectionEnd: (
2222
@params:
2323
The callback of the event is called with the following parameters:
2424

25-
- `startCell` - an object that contains the initial cell of the selection, includes the following properties:
26-
- `row` - the row configuration object
27-
- `column`- the column configuration object
28-
- `endCell` - an object that contains the end cell at the time of selection completion, includes the following properties:
29-
- `row` - the row configuration object
30-
- `column`- the column configuration object
31-
- `handle` - indicates whether the handle was used (`true`) or a regular selection (`false`)
32-
- `event` - the browser event: `MouseEvent` or `TouchEvent`
25+
<table>
26+
<tbody>
27+
<tr>
28+
<td><b>startCell</b></td>
29+
<td>(<i>object</i>) an object that contains the initial cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
30+
</tr>
31+
<tr>
32+
<td><b>endCell</b></td>
33+
<td>(<i>object</i>) an object that contains the end cell at the time of selection completion, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
34+
</tr>
35+
<tr>
36+
<td><b>handle</b></td>
37+
<td>(<i>boolean</i>) indicates whether the handle was used (`true`) or a regular selection (`false`)</td>
38+
</tr>
39+
<tr>
40+
<td><b>event</b></td>
41+
<td>(<i>Event</i>) the browser event: `MouseEvent` or `TouchEvent`</td>
42+
</tr>
43+
</tbody>
44+
</table>
3345

3446
@example:
3547
grid.block.events.on("blockSelectionEnd", (startCell, endCell) => {

docs/grid/api/blockselection/blockselectionstart_event.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,26 @@ blockSelectionStart: (
2222
@params:
2323
The callback of the event is called with the following parameters:
2424

25-
- `startCell` - an object that contains the initial cell of the selection, includes the following properties:
26-
- `row` - the row configuration object
27-
- `column`- the column configuration object
28-
- `endCell` - an object that contains the end cell at the start of the selection, includes the following properties:
29-
- `row` - the row configuration object
30-
- `column`- the column configuration object
31-
- `handle` - indicates whether the handle is used (`true`) or a regular selection (`false`)
32-
- `event` - a browser event: `MouseEvent` or `TouchEvent`
25+
<table>
26+
<tbody>
27+
<tr>
28+
<td><b>startCell</b></td>
29+
<td>(<i>object</i>) an object that contains the initial cell of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
30+
</tr>
31+
<tr>
32+
<td><b>endCell</b></td>
33+
<td>(<i>object</i>) an object that contains the end cell at the start of the selection, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
34+
</tr>
35+
<tr>
36+
<td><b>handle</b></td>
37+
<td>(<i>boolean</i>) indicates whether the handle is used (`true`) or a regular selection (`false`)</td>
38+
</tr>
39+
<tr>
40+
<td><b>event</b></td>
41+
<td>(<i>Event</i>) the browser event: `MouseEvent` or `TouchEvent`</td>
42+
</tr>
43+
</tbody>
44+
</table>
3345

3446
@returns:
3547
Return `false` to cancel the action; otherwise, `true`.

docs/grid/api/blockselection/blockselectionvalidate_event.md

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,22 @@ blockSelectionValidate: (
2121
@params:
2222
The callback of the event is called with the following parameters:
2323

24-
- `validateCell` - an object that contains the cell where the selection starts, includes the following properties:
25-
- `row` - the row configuration object
26-
- `column`- the column configuration object
27-
- `handle` - indicates whether the handle is used (`true`) or a regular selection (`false`)
28-
- `event` - the browser event: `MouseEvent` or `TouchEvent`
24+
<table>
25+
<tbody>
26+
<tr>
27+
<td><b>validateCell</b></td>
28+
<td>(<i>object</i>) an object that contains the cell where the selection starts, includes the following properties:<ul><li><b>`row`</b> - (<i>object</i>) the row configuration object </li><li><b>`column`</b> - (<i>object</i>) the column configuration object</li></ul></td>
29+
</tr>
30+
<tr>
31+
<td><b>handle</b></td>
32+
<td>(<i>boolean</i>) indicates whether the handle is used (`true`) or a regular selection (`false`)</td>
33+
</tr>
34+
<tr>
35+
<td><b>event</b></td>
36+
<td>(<i>Event</i>) the browser event: `MouseEvent` or `TouchEvent`</td>
37+
</tr>
38+
</tbody>
39+
</table>
2940

3041
@returns:
3142
Return `false` to cancel the action; otherwise, `true`.

0 commit comments

Comments
 (0)