Class responsible for all of the Autofill-related operations on merged cells.
Members
-
mergedCellsCollectionMergedCellsCollection
-
Reference to the MergedCellsCollection class instance.
-
pluginMergeCells
-
Reference to the Merge Cells plugin.
Methods
-
correctSelectionAreaSize(selectionArea)
-
Correct the provided selection area, so it's not selecting only a part of a merged cell.
Parameters:
Name Type Description selectionArea
Array The selection to correct.
-
dragAreaOverlapsCollections(baseArea, fullArea, direction){boolean}
-
Check if the drag area contains any merged cells.
Parameters:
Name Type Description baseArea
Array The base selection area.
fullArea
Array The base area extended by the drag area.
direction
string Drag direction.
Returns: {boolean}
-
getDirection(selectionArea, finalArea){string}
-
Get the direction of the autofill process.
Parameters:
Name Type Description selectionArea
Array The selection area.
finalArea
Array The final area (base + drag).
Returns: {string}
up
,down
,left
orright
. -
recreateAfterDataPopulation(changes)
-
Recreate the merged cells after the autofill process.
Parameters:
Name Type Description changes
Array Changes made.
-
snapDragArea(baseArea, dragArea, dragDirection, foundMergedCells){Array}
-
Snap the drag area to the farthest merged cell, so it won't clip any of the merged cells.
Parameters:
Name Type Description baseArea
Array The base selected area.
dragArea
Array The drag area.
dragDirection
string The autofill drag direction.
foundMergedCells
Array MergeCellCoords found in the base selection area.
Returns: {Array} The new drag area.