Class: ManualColumnMove

ManualColumnMove

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 12

Handsontable ManualColumnMove

Has 2 UI components:

  • handle - the draggable element that sets the desired position of the column,
  • guide - the helper guide that shows the desired position as a vertical guide

Warning! Whenever you make a change in this file, make an analogous change in manualRowMove.js

Members

columnPositionsArray

Manual column positions array.

currentTHHTMLElement

Currently processed TH element.

eventManagerObject

Event Manager object.

guideElementHTMLElement

DOM element representing the vertical guide line.

handleElementHTMLElement

DOM element representing the move handle.

Methods

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 340

changeColumnPositions(columnIndex, destinationIndex)

Change the column position. It puts the columnIndex column after the destinationIndex column.

Parameters:
Name Type Description
columnIndex Number

Index of the column to move.

destinationIndex Number

Index of the destination column.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 286

checkColumnHeader(element){Boolean}

Check if the provided element is in the column header.

Parameters:
Name Type Description
element HTMLElement

The DOM element to be checked.

Returns: {Boolean}
handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 187

completeSettingsArray()

Complete the manual column positions array to match its length to the column count.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 305

createPositionData(len)

Create the initial column position data.

Parameters:
Name Type Description
len Number

The desired length of the array.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 132

disablePlugin()

Disable the plugin.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 88

enablePlugin()

Enable the plugin.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 368

getLogicalColumnIndex(column){Number|undefined}

Get the logical column index from the provided visible index.

Parameters:
Name Type Description
column Number

Visible column index.

Returns: {Number|undefined} Logical column index.
handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 321

getTHFromTargetElement(element){HTMLElement|null}

Get the TH parent element from the provided DOM element.

Parameters:
Name Type Description
element HTMLElement

The DOM element to work on.

Returns: {HTMLElement|null} The TH element or null, if element has no TH parents.
handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 356

getVisibleColumnIndex(column){Number|undefined}

Get the visible column index from the provided logical index.

Parameters:
Name Type Description
column Number

Logical column index.

Returns: {Number|undefined} Visible column index.
handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 275

hideHandleAndGuide()

Hide both the moving handle and the moving guide.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 81

isEnabled(){boolean}

Check if plugin is enabled.

Returns: {boolean}
handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 176

loadManualColumnPositions(){Object}

Load the manual column positions.

Returns: {Object} Stored state.
handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 561

onInit()

init hook callback.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 266

refreshGuidePosition(diff)

Refresh the moving guide position.

Parameters:
Name Type Description
diff Number

Difference between the starting and current cursor position.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 230

refreshHandlePosition(TH, delta)

Refresh the moving handle position.

Parameters:
Name Type Description
TH HTMLElement

TH element with the handle.

delta Number

Difference between the related columns.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 167

saveManualColumnPositions()

Save the manual column positions.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 244

setupGuidePosition()

Setup the moving handle position.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 206

setupHandlePosition(TH)

Setup the moving handle position.

Parameters:
Name Type Description
TH HTMLElement

Currently processed TH element.

handsontable/src/plugins/manualColumnMove/manualColumnMove.js, line 122

updatePlugin()

Updates the plugin to use the latest options you have specified.