Namespace: selection

Granite.author. selection

Selection module, that handles the selection of Granite.author.Editables based on the user interaction with the Granite.author.ui.Overlays.

Granite.author.overlayManager broadcasts Overlay interaction events which are processed here

This module broadcasts cq-interaction-* events when an Granite.author.Editable receives the focus

Interactions are configurable via the Granite.author.selection.bindEvents function

Source:
selection.js

Members


<static> active

The currently active Granite.author.Editable

Source:
selection.js

<static> buttonPressed

The group selection action button of the toolbar is pressed

Source:
selection.js

<static> modifierPressed

The key combination CTRL/CMD has been pressed indicating the group selection is active

Source:
selection.js

<static> selected

The list of selected Granite.author.Editables

Source:
selection.js

Methods


<static> activate(editable)

Activates the given Granite.author.Editable (and its Granite.author.ui.Overlay)

Also set the Granite.author.ui.Overlay as being in active state

Parameters:
Name Type Description
editable Granite.author.Editable

The Granite.author.Editable for which to activate an overlay

Source:
selection.js

<static> bindEvents(config)

Binds the interaction event handlers (interaction with the overlays)

Parameters:
Name Type Argument Description
config InteractionConfig <optional>

The event handling configuration object

Source:
selection.js

<static> deactivateCurrent()

Deactivates the current Granite.author.Editable and Granite.author.ui.Overlay

Also removes all references to that Granite.author.Editable

Source:
selection.js

<static> deselect(editable)

Parameters:
Name Type Description
editable
Source:
selection.js

<static> deselectAll()

Deselects all previously selected Granite.author.ui.Overlays and Granite.author.Editables

Source:
selection.js

<static> getAllSelected()

Returns all the selected Granite.author.Editables

Source:
selection.js
Returns:
Type
Array.<Granite.author.Editable>

<static> getCurrentActive()

Returns the currently active Granite.author.Editable

The active Granite.author.Editable is the one that has the focus (Probably also have the editable toolbar floating nearby)

Source:
selection.js
Returns:
Type
Granite.author.Editable

<static> getPreviousSelected()

Gets the previously selected Granite.author.Editable

Source:
selection.js
Returns:
Type
Granite.author.Editable

<static> isSingleSelection()

Is the current selection in single mode

By opposition with the multiple mode

Source:
selection.js
Returns:
Type
boolean

<static> select(editable)

Parameters:
Name Type Description
editable Granite.author.Editable
Source:
selection.js

<static> unbindEvents()

Unbinds the interaction event handlers

Source:
selection.js