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
object 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){Array.<object>}
-
Parse plugin's settings.
Parameters:
Name Type Description settings
Array The settings array.
Returns: {Array.<object>}
-
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 optional 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.