Class: ManualRowMove

ManualRowMove

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

HandsontableManualRowMove

Has 2 UI components:

  • handle - the draggable element that sets the desired position of the row
  • guide - the helper guide that shows the desired position as a horizontal guide

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

Members

currentTHHTMLElement

Currently processed TH element.

eventManagerObject

Event Manager object.

guideElementHTMLElement

DOM element representing the horizontal guide line.

handleElementHTMLElement

DOM element representing the move handle.

rowPositionsArray

Manual column positions array.

Methods

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 335

changeRowPositions(rowIndex, destinationIndex)

Change the row position. It puts the rowIndex row after the destinationIndex row.

Parameters:
Name Type Description
rowIndex Number

Index of the row to move.

destinationIndex Number

Index of the destination row.

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 282

checkRowHeader(element){Boolean}

Check if the provided element is in the row header.

Parameters:
Name Type Description
element HTMLElement

The DOM element to be checked.

Returns: {Boolean}
handsontable/src/plugins/manualRowMove/manualRowMove.js, line 183

completeSettingsArray()

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

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 301

createPositionData(len)

Create the initial row position data.

Parameters:
Name Type Description
len Number

The desired length of the array.

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 128

disablePlugin()

Disable the plugin.

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 84

enablePlugin()

Enable the plugin.

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 363

getLogicalRowIndex(row){Number|undefined}

Get the logical row index from the provided visible index.

Parameters:
Name Type Description
row Number

Visible row index.

Returns: {Number|undefined} Logical row index.
handsontable/src/plugins/manualRowMove/manualRowMove.js, line 317

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/manualRowMove/manualRowMove.js, line 351

getVisibleRowIndex(row){Number|undefined}

Get the visible row index from the provided logical index.

Parameters:
Name Type Description
row Number

Logical row index.

Returns: {Number|undefined} Visible row index.
handsontable/src/plugins/manualRowMove/manualRowMove.js, line 271

hideHandleAndGuide()

Hide both the moving handle and the moving guide.

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 77

isEnabled(){boolean}

Check if plugin is enabled.

Returns: {boolean}
handsontable/src/plugins/manualRowMove/manualRowMove.js, line 172

loadManualRowPositions(){Object}

Load the manual row positions.

Returns: {Object} Stored state.
handsontable/src/plugins/manualRowMove/manualRowMove.js, line 541

onInit()

init hook callback.

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 262

refreshGuidePosition(diff)

Refresh the moving guide position.

Parameters:
Name Type Description
diff Number

Difference between the starting and current cursor position.

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 226

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 rows.

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 163

saveManualRowPositions()

Save the manual row positions.

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 240

setupGuidePosition()

Setup the moving handle position.

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 202

setupHandlePosition(TH)

Setup the moving handle position.

Parameters:
Name Type Description
TH HTMLElement

Currently processed TH element.

handsontable/src/plugins/manualRowMove/manualRowMove.js, line 118

updatePlugin()

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