Skip to content

Commit 0929483

Browse files
authored
Merge pull request #28 from ngasst/fix/typos
fix typos in readme
2 parents 7d38420 + 8316663 commit 0929483

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ install
5050

5151
````
5252

53-
The `value` property is array of `ISlTreeNodeModel` nodes:
53+
The `value` property is an array of `ISlTreeNodeModel` nodes:
5454

5555
````typescript
5656
interface ISlTreeNodeModel<TDataType> {
@@ -65,16 +65,16 @@ interface ISlTreeNodeModel<TDataType> {
6565
}
6666
````
6767

68-
For convenience the component's events return `ISlTreeNode` objects those actually are `ISlTreeNodeModel`
68+
For convenience the component's events return `ISlTreeNode` objects. Those actually are `ISlTreeNodeModel`
6969
with some computed props:
7070
````typescript
7171
interface ISlTreeNode<TDataType> extends ISlTreeNodeModel<TDataType> {
7272
isFirstChild: boolean;
7373
isLastChild: boolean;
74-
isVisible: boolean; // node is visible if the all of it's parents are expanded
74+
isVisible: boolean; // node is visible if all of its parents are expanded
7575
level: number; // nesting level
7676
ind: number; // index in the array of siblings
77-
path: number[]; // path to node as array of indexes, for exaple [2, 0, 1] in example above is path to `Item4`
77+
path: number[]; // path to node as array of indexes, for example [2, 0, 1] in the example above is path to `Item4`
7878
pathStr: string; // serialized path to node
7979
children: ISlTreeNode<TDataType>[];
8080
}
@@ -88,9 +88,9 @@ You can get the list of `ISlTreeNode` from the computed `slVueTree.nodes` proper
8888

8989
| prop | type | default | description |
9090
|------------------|--------------------|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
91-
| value | ISlTreeNodeModel[] | [] | An array of nodes to show. Each node represented by `ISlTreeNodeModel` interface |
91+
| value | ISlTreeNodeModel[] | [] | An array of nodes to show. Each node is represented by `ISlTreeNodeModel` interface |
9292
| allowMultiselect | Boolean | true | Disable or enable the multiselect feature |
93-
| edgeSize | Number | 3 | Offset in pixels from top and bottom for folder-node element. While dragging cursor is in that offset, the dragging node will be placed before or after the folder-node instead to be placed inside the folder. |
93+
| edgeSize | Number | 3 | Offset in pixels from top and bottom for folder-node element. While dragging cursor is in that offset, the dragging node will be placed before or after the folder-node instead of being placed inside the folder. |
9494
| scrollAreaHeight | Number | 70 | Offset in pixels from top and bottom for the component element. While dragging cursor is in that area, the scrolling starts. |
9595
| maxScrollSpeed | Number | 20 | The scroll speed is relative to the cursor position. Defines the max scroll speed.
9696
| multiselectKey | string|string[] | ['ctrlKey', 'metaKey'] | The keys for multiselect mode. Allowed values are ['ctrlKey', 'metaKey', 'altKey']
@@ -100,7 +100,7 @@ You can get the list of `ISlTreeNode` from the computed `slVueTree.nodes` proper
100100
| prop | type | description |
101101
|----------------|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
102102
| nodes | ISlTreeNode[] | List of nodes with some computed props. See `ISlTreeNode` interface. |
103-
| cursorPosition | ICursorPosition | Represents the current cursor position that describes the action that will be applied to the dragged node while `mouseup` event. See `ICursorPosition` interface |
103+
| cursorPosition | ICursorPosition | Represents the current cursor position that describes the action that will be applied to the dragged node on `mouseup` event. See `ICursorPosition` interface |
104104
| selectionSize | Number | The count of selected nodes
105105
| dragSize | Number | The count of selected and draggable nodes
106106
| isDragging | Boolean | True if nodes are dragging
@@ -116,7 +116,7 @@ interface ICursorPosition<TDataType> {
116116

117117
| event | callback arguments | description |
118118
|-----------------|----------------------------------------------------------------------------|---------------------------------------------------|
119-
| input | nodes: ISlTreeNodeModel[] | triggers for any changes for `value` property |
119+
| input | nodes: ISlTreeNodeModel[] | triggers for any changes to `value` property |
120120
| select | selectedNodes: ISlTreeNode[], event: MouseEvent | triggers when a node has been selected/deselected |
121121
| toggle | toggledNode: ISlTreeNode, event: MouseEvent | triggers when a node has been collapsed/expanded |
122122
| drop | draggingNodes: ISlTreeNode[], position: ICursorPosition, event: MouseEvent | triggers when dragging nodes have been dropped |
@@ -129,11 +129,11 @@ interface ICursorPosition<TDataType> {
129129

130130
| method | description |
131131
|----------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------|
132-
| getNode(path: number[]): ISlTreeNode | Find the node by using it's path |
132+
| getNode(path: number[]): ISlTreeNode | Find the node by using its path |
133133
| traverse(cb: (node: ISlTreeNode, nodeModel: ISlTreeNodeModel, siblings: ISlTreeNodeModel[]) => boolean) | Helpful method to traverse all nodes. The traversing will be stopped if callback returns `false`. |
134-
| updateNode(path: number[], patch: Partial<ISlTreeNodeModel>) | Update the node by using it's path |
135-
| select(path: number[], addToSelection = false) | Select the node by using it's path | |
136-
| getNodeEl(): HTMLElement | Get the node HTMLElement by using it's path |
134+
| updateNode(path: number[], patch: Partial<ISlTreeNodeModel>) | Update the node by using its path |
135+
| select(path: number[], addToSelection = false) | Select the node by using its path | |
136+
| getNodeEl(): HTMLElement | Get the node HTMLElement by using its path |
137137
| getSelected(): ISlTreeNode[] | Get selected nodes |
138138
| remove(paths: number[][]) | Remove nodes by paths. For example `.remove([[0,1], [0,2]])`
139139
| getFirstNode(): ISlTreeNode | Get the first node in the tree |

0 commit comments

Comments
 (0)