Skip to content

Commit

Permalink
Add titles
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott committed Feb 4, 2024
1 parent 14cc595 commit 9f2a498
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/pages/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ title: API
permalink: /api/
---

# API

The graph API can be used to programmatically interact with a graph you have instantiated. You can control the view of the graph using the translate / scale functions as well as create / delete / update graph nodes and edges. The full API is documented [here](https://api.playcanvas.com/modules/PCUIGraph.html).
2 changes: 2 additions & 0 deletions docs/pages/config-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Config Options
permalink: /config-options/
---

# Config Options

Options can be passed to the graph constructor as a JSON object which change the default behavior of the graph. You can do so as follows:

```javascript
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/context-menus.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Context Menus
permalink: /context-menus/
---

# Context Menus

It is possible to create context menus on your graph which display when right clicking various graph items. There are three types of context menus; background, node and edge. You can define a set of actions which will display in each of these menus and each action item in the menu will fire an action event when selected.

The background context menu appears when you right click on any blank space in the canvas. This context menu is used to add new nodes to the graph. It can be created by adding a `contextMenuItems` array to the options object passed to the graph constructor:
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Events
permalink: /events/
---

# Events

After creating a graph, you can register a callback for various events. This is achieved using the graphs [on function](https://api.playcanvas.com/classes/PCUIGraph.Graph.html#on). The following events are supported:

```javascript
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Schema
permalink: /schema/
---

# Schema

The schema object is used to define what type of graph you will be initializing. More specifically, it defines which node your graph can contain and how those nodes can be connected together with edges.

It should contain a set of nodes and edges which can be created in the graph. Each node and edge that is defined will need a unique number key which is used to reference that particular part of the schema. In the above example the single edge type defined references the two nodes contained in the schema when defining which node types it can connect. When creating large schemas, it can be useful to define these keys before creating the schema, so they can be easily referenced:
Expand Down
2 changes: 2 additions & 0 deletions docs/pages/storybook.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Storybook
permalink: /storybook-docs/
---

# Storybook

The storybook showcases PCUI-Graph's Graph component in a number of different contexts.

[Click here](../storybook/) to view the storybook.
2 changes: 2 additions & 0 deletions docs/pages/styling.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ title: Styling
permalink: /styling/
---

# Styling

You can style your graph by overriding it's default style properties. This can be achieved by modifying the defaultStyles passed in as part of an options object to the graph constructor.

```javascript
Expand Down

0 comments on commit 9f2a498

Please sign in to comment.