tracking-code-which-will-go-to-the-HEAD Action

Class

Action

Action(pluginData, viewport, layout)

Represents an interface action.
Constructor

# new Action(pluginData, viewport, layout)

Default constructor.
Parameters:
Name Type Description
pluginData DefaultData Plugin data storage.
viewport object D3 selection of the view port.
layout DefaultLayout Layout to organise components.

View Source draw/action/Action.js, line 4

Members

DefaultLayout

# layout

Layout to organise components.

View Source draw/action/Action.js, line 26

DefaultData

# pluginData

Plugin data storage.

View Source draw/action/Action.js, line 16

object

# viewport

D3 selection of the view port.

View Source draw/action/Action.js, line 21

Methods

# applySceneTransform()

Applies the scene transformation based on the plugin data.

View Source draw/action/Action.js, line 52

# execute(event) → {boolean}

Executes the action.
Parameters:
Name Type Description
event object The event triggering the action.

View Source draw/action/Action.js, line 35

Indicates whether the scene needs to be redrawn.
boolean

# finalize(event) → {boolean}

Finalizes the action.
Parameters:
Name Type Description
event object The event triggering the action.

View Source draw/action/Action.js, line 45

Indicates whether the scene needs to be redrawn.
boolean

# getSourcePosition(sourceId) → {object}

Gets the position of the source.
Parameters:
Name Type Description
sourceId string The ID of the source.

View Source draw/action/Action.js, line 78

The position of the source.
object

# getSourcesId(event) → {Array.<string>}

Gets the source IDs from the event.
Parameters:
Name Type Description
event object The event containing the source information.

View Source draw/action/Action.js, line 65

The array of source IDs.
Array.<string>

# getTargetId(event) → {string}

Gets the primary target ID from the event.
Parameters:
Name Type Description
event object The event containing the target information.

View Source draw/action/Action.js, line 148

The primary target ID.
string

# getTargetsByDepth(event) → {Array.<Array.<string>>}

Gets the targets by depth from the event.
Parameters:
Name Type Description
event object The event containing the target information.

View Source draw/action/Action.js, line 92

An array of target IDs grouped by depth.
Array.<Array.<string>>

# getTargetsId(event) → {Array.<string>}

Gets the target IDs from the event. Ids are ordered by depth, from the deepest to the shallowest.
Parameters:
Name Type Description
event object The event containing the target information.

View Source draw/action/Action.js, line 137

An array of target IDs.
Array.<string>

# getTransform(selector1, selector2) → {object}

Gets the transformation between two selectors.
Parameters:
Name Type Description
selector1 string The first selector.
selector2 string The second selector.

View Source draw/action/Action.js, line 158

The transformation between the two selectors.
object