Show:

A base class for Layout Move.

Constructor

A.LayoutBuilderMove

(
  • config
)

Parameters:

  • config Object

    Object literal specifying layout configuration properties.

Methods

_addColMoveButton

(
  • colNode
  • rowNode
)
protected

Default value for addColMoveButton attribute.

Parameters:

_addColMoveTarget

(
  • col
  • index
)
protected

Default value for addColMoveTarget attribute.

Parameters:

_addMovingClass

() protected

Adds CSS class to indicate that any element is moving.

_afterEnableMoveColsChange

() protected

Fired after the enableMoveCols attribute changes.

_afterEnableMoveRowsChange

() protected

Fired after the enableMoveRows attribute changes.

_afterMoveColsChange

() protected

Fired after cols attribute changes.

_afterMoveIsColumnModeChange

(
  • event
)
protected

Fired after layout:isColumnMode attribute changes.

Parameters:

_afterMoveLayoutChange

() protected

Fired after layout attribute changes.

_afterMoveMovableChange

(
  • event
)
protected

Fired after layout-row:movable attribute changes.

Parameters:

_afterMoveRowsChange

() protected

Fired after rows attribute changes.

_appendMoveButtonToCols

() protected

Appends a move button for each col.

_appendMoveButtonToRows

() protected

Appends one move button before each row.

_bindMoveColsEvents

() protected

Binds the necessary events for the functionality of moving cols on layout.

_bindMoveRowEvents

() protected

Binds the necessary events for the functionality of moving rows on layout.

_chooseColMoveTarget

(
  • cutButton
  • col
)
protected

Default value for chooseColMoveTarget attribute.

Parameters:

_clickColMoveTarget

(
  • target
)
protected

Default value for clickColMoveTarget attribute.

Parameters:

_clickOnCutButton

(
  • cutButton
)
protected

Starts or cancels movement of rows and cols.

Parameters:

_createRowTargetArea

() protected

Default value for chooseRowMoveTarget attribute.

_createRowTargetAreaInOneDirection

(
  • direction
)
protected

Create target area to move the row to one direction.

Parameters:

  • direction String

    Should be either 'before' or 'after'.

_hasAnythingMovable

(
  • row
)
Boolean protected

Checks if the given row either can be moved or has at least one column that can.

Parameters:

Returns:

Boolean:

_insertCutButtonOnCols

(
  • row
)
protected

Inserts cut buttons on cols.

Parameters:

_insertCutButtonOnRow

(
  • row
)
protected

Inserts cut button on a row.

Parameters:

_moveToTarget

(
  • event
)
protected

Move col or row to another place.

Parameters:

_onEscKey

() protected

Fires when the esc key is pressed.

_onKeyPressOnMoveCutButton

(
  • event
)
protected

Fires when key press on cut button.

Parameters:

_onKeyPressOnMoveTarget

(
  • event
)
protected

Fires when key press on target area.

Parameters:

_onMouseClickOnMoveCutButton

(
  • event
)
protected

Fires when click on cut button.

Parameters:

_onMouseClickOnMoveTarget

(
  • event
)
protected

Fires when click on target area.

Parameters:

_removeAllCutButton

(
  • cutButton
)
protected

Removes all cut buttons.

Parameters:

_removeColMoveButtons

(
  • clickedButton
)
protected

Default value for removeColMoveButtons attribute.

Parameters:

  • clickedButton Node

_removeColMoveTargets

() protected

Default value for removeColMoveTargets attribute.

_removeCutButtonFromRow

(
  • row
)
protected

Removes cut button from row.

Parameters:

_removeMovingClass

() protected

Removes the CSS class indicating that some element has moving.

_removeMovingClass

() protected

Removes the CSS class indicating that some element has moving.

_removeTargetArea

() protected

Removes all target area.

_resetMoveUI

() protected

Reset the UI to a initial state.

_uiSetEnableMoveCols

(
  • enableMoveCols
)
protected

Updates the UI according to the value of the enableMoveCols attribute.

Parameters:

  • enableMoveCols Boolean

_uiSetEnableMoveRows

(
  • enableMoveRows
)
protected

Updates the UI according to the value of the enableMoveRows attribute.

Parameters:

  • enableMoveRows Boolean

_unbindMoveColEvents

() protected

Unbinds the events related to the functionality of moving cols from layout.

_unbindMoveRowEvents

() protected

Unbinds the events related to the functionality of moving rows from layout.

cancelMove

()

Cancels the ongoing move operation.

destructor

() protected

Destructor implementation for the A.LayoutBuilderMove class. Lifecycle.

initializer

() protected

Construction logic executed during instantiation. Lifecycle.

Properties

_colToBeMoved

Node protected

Col that will be moved.

_rowToBeMoved

Node protected

Row that will be moved.

ATTRS

Object static

Static property used to define the default attribute configuration for the A.LayoutBuilderMove.

Attributes

addColMoveButton

Function

Default function to add move button to cols.

addColMoveTarget

Function

Default function to add target to cols.

chooseColMoveTarget

Function

Default function to choose target on cols.

chooseRowMoveTarget

Function

Default function to choose target on rows.

clickColMoveTarget

Function

Default function to click on targets in cols.

enableMoveCols

Boolean

Flag indicating if the feature of moving cols from layout is enabled or not.

Default: true

enableMoveRows

Boolean

Flag indicating if the feature of moving rows from layout is enabled or not.

Default: true

removeColMoveButtons

Function

Default function to remove move button from cols.

removeColMoveTargets

Function

Default function to remove targets from cols.