new GitGraph(optionsopt)
GitGraph
This:
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
object |
<optional> |
GitGraph options Properties
|
- Source:
Methods
applyCommits(event, callbackFn)
Hover event on commit dot
This:
Parameters:
Name | Type | Description |
---|---|---|
event |
MouseEvent | Mouse event |
callbackFn |
CommitCallback | A callback function that will be called for each commit |
- Source:
branch(options) → {Branch}
Create new branch
This:
Parameters:
Name | Type | Description |
---|---|---|
options |
string | object | Branch name | Options of Branch |
- Source:
- See:
Returns:
New branch
- Type
- Branch
click(event)
Click event on commit dot
This:
Parameters:
Name | Type | Description |
---|---|---|
event |
MouseEvent | Mouse event |
- Source:
commit(options) → {GitGraph}
Commit on HEAD
This:
Parameters:
Name | Type | Description |
---|---|---|
options |
string | BranchCommitOptions | Message | Options of commit |
- Source:
- See:
Returns:
this - Return the main object so we can chain
- Type
- GitGraph
dispose()
Disposing canvas event handlers
This:
- Source:
hover(event)
Hover event on commit dot
This:
Parameters:
Name | Type | Description |
---|---|---|
event |
MouseEvent | Mouse event |
- Source:
newTemplate(options) → {Template}
Create a new template
This:
Parameters:
Name | Type | Description |
---|---|---|
options |
string | object | The template name, or the template options |
- Source:
- See:
Returns:
- Type
- Template
orphanBranch(options) → {Branch}
Create new orphan branch
This:
Parameters:
Name | Type | Description |
---|---|---|
options |
string | object | Branch name | Options of Branch |
- Source:
- See:
Returns:
New branch
- Type
- Branch
render()
Render the canvas
This:
- Source:
tag(options) → {GitGraph}
Tag the HEAD
This:
Parameters:
Name | Type | Description |
---|---|---|
options |
object | Options of tag |
- Source:
- See:
Returns:
this - Return the main object so we can chain
- Type
- GitGraph