Namespace: overlayManager

Granite.author. overlayManager

The overlay manager includes the following and non-exhaustive list of responsibilities:


  • Instantiate and initialize the Granite.author.Overlays

  • Influence all the Granite.author.Overlays at once

  • Position all the the Granite.author.Overlays at once

Overlays are created out of the Granite.author.Editables (which are stored in Granite.author.editables)


This Granite.author.ui.Overlays are visual interfaces between the user and the underlying content


The overlay manager broadcasts cq-overlay-* events informing a given user interaction (hover, click, etc.) occurred on an overlay


Other modules could then listen to those events; like for instance Granite.author.selection

Source:
overlayManager.js

Methods


<static> create(editable)

Creates an Granite.author.ui.Overlay for the given Granite.author.Editable (if not already existing)

This process is executed for the current Granite.author.Editable instance but also recursively through its parents and children

Recursive

Parameters:
Name Type Description
editable Granite.author.Editable

Granite.author.Editable for which to create a series of Granite.author.ui.Overlay's among its parents and children. The overlay instance is also associated to its Granite.author.Editable instance

Source:
overlayManager.js

<static> destroy(editable)

Destroys the Granite.author.ui.Overlay of the given Granite.author.Editable and its children Granite.author.ui.Overlays

Recursive

Parameters:
Name Type Description
editable Granite.author.Editable

Granite.author.Editable to be destroy. This also includes its children

Source:
overlayManager.js

<static> getOverlayRendering()

Returns the currently used Overlay constructor

Source:
overlayManager.js

<static> recreate(editable)

Recreates an Granite.author.ui.Overlay for the given Granite.author.Editable

Recursive

Parameters:
Name Type Description
editable Granite.author.Editable

Granite.author.Editable for which to recreate an Granite.author.ui.Overlay

Source:
overlayManager.js

<static> reposition()

Repositions all the Granite.author.ui.Overlays

Source:
overlayManager.js
Fires:

<static> resetOverlayRendering()

Resets the Overlay constructor to default (Granite.author.ui.Overlay)

Source:
overlayManager.js

<static> setOverlayRendering(fn)

Sets a custom Overlay constructor

Parameters:
Name Type Description
fn function

the Overlay constructor

Source:
overlayManager.js

<static> setOverlaysVisible(condition)

Shows or hides the overlays but not the container

Parameters:
Name Type Argument Description
condition boolean <optional>

Should the Granite.author.ui.Overlays be visible

Source:
overlayManager.js

<static> setup()

Creates overlays out of the Granite.author.editables store

Source:
overlayManager.js

<static> setVisible(condition)

Shows or hides the main container (all overlays)

Parameters:
Name Type Argument Description
condition boolean <optional>

Should the Overlay (#ContentWrapper) container be visible

Source:
overlayManager.js

<static> teardown()

Removes all overlays from the current Granite.author.editables store

Source:
overlayManager.js