new Overlay(editable, container)
Parameters:
Name | Type | Description |
---|---|---|
editable |
Granite.author.Editable | The source editable of the current overlay |
container |
HTMLElement | The HTML element to which append the Overlay |
- Source:
- ui/ui.Overlay.js
Methods
-
isActive()
-
Is the current overlay active
- Source:
- ui/ui.Overlay.js
Returns:
- Type
- boolean
-
isDisabled()
-
Is the current overlay disabled
- Source:
- ui/ui.Overlay.js
Returns:
- Type
- boolean
-
isHover()
-
Is the current overlay hovered
- Source:
- ui/ui.Overlay.js
Returns:
- Type
- boolean
-
isSelected()
-
Is the current overlay selected
- Source:
- ui/ui.Overlay.js
Returns:
- Type
- boolean
-
isVisible()
-
Is the current overlay visible
- 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 ContentFrameParameters:
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
- Source:
- ui/ui.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
- Source:
- ui/ui.Overlay.js
Returns:
- The definition object required by the Granite.author.ui.Overlay#render function
- 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
- Source:
- ui/ui.Overlay.js
-
remove()
-
Removes the Granite.author.ui.Overlay HTMLElement from its DOM container
Teardown function
- 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
- Source:
- ui/ui.Overlay.js
-
setActive(condition)
-
Toggle activate the current overlay
Parameters:
Name Type Description condition
boolean Whether or not to activate the current overlay
- 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
- 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
- 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
- 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
- Source:
- ui/ui.Overlay.js