new GitGraph(options)
GitGraph
This:
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | 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
Object 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
Parameters:
Name Type Description options
String | Object The template name, or the template options
- Source:
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