Skip to content

Commit 4256d2f

Browse files
authored
update the repo by upgrading deps, fixing linting issues, updating the rollup build and updating the Graph docs (#33)
1 parent f4d72cb commit 4256d2f

File tree

10 files changed

+29276
-36464
lines changed

10 files changed

+29276
-36464
lines changed

docs/Graph.md

Lines changed: 45 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Represents a new Graph.
3030
- [createNode](Graph.md#createnode)
3131
- [updateNodePosition](Graph.md#updatenodeposition)
3232
- [updateNodeAttribute](Graph.md#updatenodeattribute)
33+
- [setNodeAttributeErrorState](Graph.md#setnodeattributeerrorstate)
3334
- [updateNodeType](Graph.md#updatenodetype)
3435
- [deleteNode](Graph.md#deletenode)
3536
- [deleteEdge](Graph.md#deleteedge)
@@ -64,14 +65,15 @@ Creates a new Graph.
6465
| `options.edgeHoverEffect` | `boolean` | Whether the graph should show an edge highlight effect when the mouse is hovering over edges. Optional. Defaults to true. |
6566
| `options.includeFonts` | `boolean` | If true the graph will include a default font style. Defaults to true. |
6667
| `options.defaultStyles` | `any` | Used to override the graph's default styling. Check ./constants.js for a full list of style properties. |
68+
| `options.adjustVertices` | `any` | If true, all edges connecting the same nodes will have their positions shifted so all are visibly separate on screen. |
6769

6870
#### Overrides
6971

7072
Element.constructor
7173

7274
#### Defined in
7375

74-
[index.js:29](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L29)
76+
[index.js:30](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L30)
7577

7678
## Accessors
7779

@@ -89,7 +91,7 @@ The current graph data. Contains an object with any nodes and edges present in t
8991

9092
#### Defined in
9193

92-
[index.js:81](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L81)
94+
[index.js:92](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L92)
9395

9496
## Methods
9597

@@ -105,7 +107,7 @@ Destroy the graph. Clears the graph from the DOM and removes all event listeners
105107

106108
#### Defined in
107109

108-
[index.js:88](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L88)
110+
[index.js:99](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L99)
109111

110112
___
111113

@@ -127,7 +129,7 @@ Select a node in the current graph.
127129

128130
#### Defined in
129131

130-
[index.js:202](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L202)
132+
[index.js:213](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L213)
131133

132134
___
133135

@@ -150,7 +152,7 @@ Select an edge in the current graph.
150152

151153
#### Defined in
152154

153-
[index.js:215](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L215)
155+
[index.js:226](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L226)
154156

155157
___
156158

@@ -166,7 +168,7 @@ Deselect the currently selected item in the graph.
166168

167169
#### Defined in
168170

169-
[index.js:226](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L226)
171+
[index.js:237](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L237)
170172

171173
___
172174

@@ -189,7 +191,7 @@ Add an edge to the graph
189191

190192
#### Defined in
191193

192-
[index.js:245](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L245)
194+
[index.js:256](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L256)
193195

194196
___
195197

@@ -211,7 +213,7 @@ Add a node to the graph
211213

212214
#### Defined in
213215

214-
[index.js:378](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L378)
216+
[index.js:389](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L389)
215217

216218
___
217219

@@ -234,7 +236,7 @@ Update the position of a node
234236

235237
#### Defined in
236238

237-
[index.js:418](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L418)
239+
[index.js:429](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L429)
238240

239241
___
240242

@@ -258,7 +260,31 @@ Update the value of an attribute of a node
258260

259261
#### Defined in
260262

261-
[index.js:433](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L433)
263+
[index.js:444](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L444)
264+
265+
___
266+
267+
### setNodeAttributeErrorState
268+
269+
**setNodeAttributeErrorState**(`nodeId`, `attributeName`, `value`): `void`
270+
271+
Set the error state of a node attribute
272+
273+
#### Parameters
274+
275+
| Name | Type | Description |
276+
| :------ | :------ | :------ |
277+
| `nodeId` | `number` | The node to update |
278+
| `attributeName` | `string` | The name of the attribute to update |
279+
| `value` | `boolean` | Whether the attribute should be set in the error state |
280+
281+
#### Returns
282+
283+
`void`
284+
285+
#### Defined in
286+
287+
[index.js:458](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L458)
262288

263289
___
264290

@@ -281,7 +307,7 @@ Update the type of a node
281307

282308
#### Defined in
283309

284-
[index.js:446](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L446)
310+
[index.js:470](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L470)
285311

286312
___
287313

@@ -303,7 +329,7 @@ Delete a node from the graph
303329

304330
#### Defined in
305331

306-
[index.js:476](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L476)
332+
[index.js:500](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L500)
307333

308334
___
309335

@@ -325,7 +351,7 @@ Delete an edge from the graph
325351

326352
#### Defined in
327353

328-
[index.js:492](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L492)
354+
[index.js:516](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L516)
329355

330356
___
331357

@@ -348,7 +374,7 @@ Set the center of the viewport to the given position
348374

349375
#### Defined in
350376

351-
[index.js:524](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L524)
377+
[index.js:548](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L548)
352378

353379
___
354380

@@ -366,7 +392,7 @@ The current center position of the viewport in the graph as an object containing
366392

367393
#### Defined in
368394

369-
[index.js:534](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L534)
395+
[index.js:558](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L558)
370396

371397
___
372398

@@ -388,7 +414,7 @@ Set the scale of the graph
388414

389415
#### Defined in
390416

391-
[index.js:544](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L544)
417+
[index.js:568](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L568)
392418

393419
___
394420

@@ -406,7 +432,7 @@ The current scale of the graph
406432

407433
#### Defined in
408434

409-
[index.js:557](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L557)
435+
[index.js:581](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L581)
410436

411437
___
412438

@@ -430,7 +456,7 @@ The position in the graph based on the given window position, as an object conta
430456

431457
#### Defined in
432458

433-
[index.js:569](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L569)
459+
[index.js:593](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L593)
434460

435461
___
436462

@@ -453,4 +479,4 @@ Add an event listener to the graph
453479

454480
#### Defined in
455481

456-
[index.js:580](https://github.com/playcanvas/pcui-graph/blob/269ac07/src/index.js#L580)
482+
[index.js:604](https://github.com/playcanvas/pcui-graph/blob/f4d72cb/src/index.js#L604)

0 commit comments

Comments
 (0)