Class: Overlay

Granite.author.edit. Overlay

Overlay to be used in edit mode

Augments the Granite.author.ui.Overlay with the concept of drop targets (ability to drag objects on Granite.author.ui.Overlays)


new Overlay()

Source:
edit/edit.Overlay.js

Extends

Members


dropTargets :Array|Object

Drop targets of the associated editable

See: Granite.author.Editable#getDropTarget

Type:
  • Array | Object
Source:
edit/edit.Overlay.js

Methods


isActive()

Is the current overlay active

Inherited From:
Source:
ui/ui.Overlay.js
Returns:
Type
boolean

isDisabled()

Is the current overlay disabled

Inherited From:
Source:
ui/ui.Overlay.js
Returns:
Type
boolean

isHover()

Is the current overlay hovered

Inherited From:
Source:
ui/ui.Overlay.js
Returns:
Type
boolean

isSelected()

Is the current overlay selected

Inherited From:
Source:
ui/ui.Overlay.js
Returns:
Type
boolean

isVisible()

Is the current overlay visible

Inherited From:
Source:
ui/ui.Overlay.js
Returns:
Type
boolean

position(editable, parent)

Called to position the current Granite.author.ui.Overlay on top of the content of the page
that correspond to its associated Granite.author.Editable and the original content of the edited page located in the ContentFrame

Parameters:
Name Type Description
editable Granite.author.Editable

The Granite.author.Editable instance for which to render an overlay

parent Granite.author.Editable

The Granite.author.Editable parent of the editable object

Inherited From:
Source:
ui/ui.Overlay.js

positionChildEditorTargets(editable, parent)

Positions drop targets of the children of the given editable relative to the given parent

Parameters:
Name Type Description
editable Granite.author.Editable

Associated Granite.author.Editable

parent Granite.author.edit.Overlay

Parent overlay

Source:
edit/edit.Overlay.js

positionDropTargets(editable, parent)

Positions the drop targets relative to the given parent

Parameters:
Name Type Description
editable Granite.author.Editable

Associated Granite.author.Editable

parent Granite.author.edit.Overlay

Parent overlay

Source:
edit/edit.Overlay.js

prepareRendering(editable)

Returns a definition object based on the given Granite.author.Editable and used when rendering the Overlay

Parameters:
Name Type Description
editable Granite.author.Editable

The Granite.author.Editable instance for which to render an overlay

Inherited From:
Source:
ui/ui.Overlay.js
Returns:
Type
Object

recreate(editable)

Recreates the overlay for the given Granite.author.Editable

Parameters:
Name Type Description
editable Granite.author.Editable

The Granite.author.Editable instance for which to render an overlay

Inherited From:
Source:
ui/ui.Overlay.js

remove()

Removes the Granite.author.ui.Overlay HTMLElement from its DOM container

Teardown function

Inherited From:
Source:
ui/ui.Overlay.js

render(editable)

Renders the Granite.author.ui.Overlay in the given container element

Parameters:
Name Type Description
editable Granite.author.Editable

The Granite.author.Editable instance for which to render an overlay

Inherited From:
Source:
ui/ui.Overlay.js

renderChildEditorTargets(editable, container)

Appends the actual drop targets DOM elements for each children of the given Granite.author.Editable

Parameters:
Name Type Description
editable Granite.author.Editable

Associated Granite.author.Editable

container HTMLElement

Target container of the overlay

Source:
edit/edit.Overlay.js

renderDropTargets(editable, container)

Appends the actual drop targets DOM elements

Parameters:
Name Type Description
editable Granite.author.Editable

Associated Granite.author.Editable

container HTMLElement

Target container of the overlay

Source:
edit/edit.Overlay.js

renderLayoutHandles(editable, container)

Adds the handles to resize the overlay

Parameters:
Name Type Description
editable Granite.author.Editable

Associated Granite.author.Editable

container HTMLElement

Target container of the overlay

Source:
edit/edit.Overlay.js

setActive(condition)

Toggle activate the current overlay

Parameters:
Name Type Description
condition boolean

Whether or not to activate the current overlay

Inherited From:
Source:
ui/ui.Overlay.js

setDisabled(condition)

Toggle disables the current overlay

Parameters:
Name Type Description
condition boolean

Whether or not to disable the current overlay

Inherited From:
Source:
ui/ui.Overlay.js

setHover(condition)

Toggle disables the current overlay

Parameters:
Name Type Description
condition boolean

Whether or not to disable the current overlay

Inherited From:
Source:
ui/ui.Overlay.js

setSelected(condition)

Toggle select the current overlay

Parameters:
Name Type Description
condition boolean

Whether or not to select the current overlay

Inherited From:
Source:
ui/ui.Overlay.js

setVisible(condition)

Toggle displays the current overlay

Parameters:
Name Type Description
condition boolean

Whether or not to display the current overlay

Inherited From:
Source:
ui/ui.Overlay.js