Class: Endpoints

Endpoints

Class used to make all endpoint-related operations.

Members

currentEndpointObject

The current endpoint (calculation destination point) in question.

Default Value: null

endpointsArray

Array of declared plugin endpoints (calculation destination points).

Default Value: {Array} Empty array.

hotObject

Handsontable instance.

plugin

The main plugin instance.

settingsObject function

The plugin settings, taken from Handsontable configuration.

Default Value: null

settingsTypestring

Settings type. Can be either 'array' or 'function.

Default Value: {'array'}

Methods

assignSetting(settings, endpoint, name, defaultValue)

Setter for the internal setting objects.

Parameters:
Name Type Description
settings Object

Object with the settings.

endpoint Object

Contains information about the endpoint for the the calculation.

name String

Settings name.

defaultValue

Default value for the settings.

getAllEndpoints(){Array}

Get an array with all the endpoints.

Returns: {Array}

getEndpoint(index){Object}

Get a single endpoint object.

Parameters:
Name Type Description
index Number

Index of the endpoint.

Returns: {Object}

parseSettings(settings)

Parse plugin's settings.

Parameters:
Name Type Description
settings Array

The settings array.

refreshAllEndpoints()

Calculate and refresh all defined endpoints.

refreshChangedEndpoints(changes)

Calculate and refresh endpoints only in the changed columns.

Parameters:
Name Type Description
changes Array

Array of changes from the afterChange hook.

refreshEndpoint(endpoint)

Calculate and refresh a single endpoint.

Parameters:
Name Type Description
endpoint Object

Contains the endpoint information.

resetAllEndpoints(endpoints, useOffset)

Resets (removes) the endpoints from the table.

Parameters:
Name Type Default Description
endpoints Array

Array containing the endpoints.

useOffset Boolean true optional

Use the cell offset value.

resetEndpointValue(endpoint, useOffset)

Reset the endpoint value.

Parameters:
Name Type Default Description
endpoint Object

Contains the endpoint information.

useOffset Boolean true optional

Use the cell offset value.

setEndpointValue(endpoint, source, render)

Set the endpoint value.

Parameters:
Name Type Default Description
endpoint Object

Contains the endpoint information.

source String optional

Source of the call information.

render Boolean false optional

true if it needs to render the table afterwards.