Class: Layer

Granite.author.developer. Layer

The Developer Layer allows to inspect the AEM components present in the page, browse them using a tree view and access their corresponding rendering scripts. As a "read-only" view, it doesn't provide any editing capabilities.


new Layer()

Source:
developer/developer.Layer.js

Extends

Members


config :LayerConfig

The default Layer Configuration that will be used to configure the Layer behavior.

Subclasses should override this object instead of overriding Layer#activate and Layer#deactivate methods. If additional adjustments are needed (that aren't configurable yet in the activate method), please leverage the setUp and tearDown methods.

For an example of a Layer configuration object, refer to edit.CONFIG

Type:
Inherited From:
Source:
layers/Layer.js

Methods


<private> _activateOverlays()

Activates the overlay manager and the overlay creation mechanic

Inherited From:
Source:
layers/Layer.js

activate()

Activates the Layer according to its configuration. It includes the following operations:

  • Creates the Editables in the store (according to config.editableConstructor)
  • Creates the Overlays for the Editables (according to config.overlayConstructor)
  • Sets the Editable Toolbar (according to config.toolbarConstructor + config.toolbarActions)
  • Initializes the SidePanel (according to config.sidePanel)
  • Binds the Interaction events on Overlays (according to config.interactions)

WARNING: Don't override this method since it is aimed at being configurable through the Layer configuration object. If you need to perform specific operations, refer to the setUp method.

Inherited From:
Source:
layers/Layer.js
Returns:
  • The current layer
Type
Granite.author.Layer

constructor()

Source:
developer/developer.Layer.js

deactivate()

Reverts the actions executed by Granite.author.Layer#activate

WARNING: Don't override this method since it is aimed at being configurable through the Layer configuration object. If you need to perform specific operations, refer to the tearDown method.

Inherited From:
Source:
layers/Layer.js
Returns:
  • The current Layer
Type
Granite.author.Layer

isAvailable()

Is the page info set as for developer mode

Overrides:
Source:
developer/developer.Layer.js

setUp()

Override this method to execute specific set up operations (in addition to the activate method)
This method is called by Granite.author.Layer#activate

Inherited From:
Source:
layers/Layer.js

tearDown()

Override this method to execute specific clean up operations (in addition to the deactivate method)
This method is called by Granite.author.Layer#deactivate

Inherited From:
Source:
layers/Layer.js