Global

Methods

<private> _emitEvent(element, eventName, data)

Emit an event on the given element.

Parameters:
Name Type Argument Default Description
element HTMLElement

DOM element to trigger the event on.

eventName String

Name of the triggered event.

data Object <optional>
{}

Custom data to attach to the event.

Source:

<private> _getScale(context) → {Number}

Returns the scaling factor of given canvas context. Handles high-resolution displays.

Parameters:
Name Type Description
context Object
Source:
Returns:
Type
Number

<private> _isHorizontal(graph) → {boolean}

Returns true if graph has an horizontal orientation.

Parameters:
Name Type Description
graph GitGraph
Source:
Returns:
Type
boolean

<private> _isVertical(graph) → {boolean}

Returns true if graph has a vertical orientation.

Parameters:
Name Type Description
graph GitGraph
Source:
Returns:
Type
boolean

Type Definitions

commitCallback(commit, mouseOver)

A callback for each commit

Parameters:
Name Type Description
commit Commit

A commit

mouseOver boolean

True, if the mouse is currently hovering over the commit

Source: