Namespace: responsive

Granite.author. responsive

Namespace of the Responsive mode

Also contains utilities

Source:
responsive/responsive.js

Classes

Layer
Overlay
Toolbar

Members


<static> DEFAULT_CSS_PREFIX :String

Css prefix for the responsive grid

Type:
Source:
responsive/responsive.js

<static> NN_RESPONSIVE :String

JCR node name for the responsive config

Type:
Source:
responsive/responsive.js

Methods


<static> getBreakpoint(name)

gets a breakpoint config by name

Parameters:
Name Type Description
name
Source:
responsive/responsive.js
Returns:
Type
Object

<static> getBreakpoints()

Returns all set breakpoints on the page

Source:
responsive/responsive.js
Returns:
Type
Object

<static> getCurrentBreakpoint()

Returns the name of the currently active breakpoint

Source:
responsive/responsive.js
Returns:
Type
String

<static> getCurrentResponsiveBehavior(editable)

Returns the currently ACTIVE behavior for an editable for the currently active breakpoint

Parameters:
Name Type Description
editable
Source:
responsive/responsive.js
Returns:
Type
String

<static> getCurrentResponsiveConfig(editable)

Returns the currently ACTIVE configuration for an editable for the currently active breakpoint

Parameters:
Name Type Description
editable
Source:
responsive/responsive.js
Returns:
Type
Object

<static> getDeviceBreakpoint(deviceWidth)

gets the breakpoint for a given device width

Parameters:
Name Type Description
deviceWidth
Source:
responsive/responsive.js
Returns:
Type
Object

<static> getGridWidth(gridEditable)

Parameters:
Name Type Description
gridEditable
Source:
responsive/responsive.js
Returns:

amount of grid cells for the current breakpoint

Type
number

<static> getHiddenChildren(editable, breakpoint)

returns a list of hidden children of the responsive grid component

Parameters:
Name Type Description
editable
breakpoint
Source:
responsive/responsive.js
Returns:
Type
Array

<static> getOrderedBreakpoints()

Source:
responsive/responsive.js
Returns:

ordered list of breakpoint names (by width)

Type
Array.String

<static> getResponsiveCssClasses(editable)

returns a String of CSS classes which will decorate a component in a responsive grid

Parameters:
Name Type Description
editable
Source:
responsive/responsive.js
Returns:
Type
string

<static> isInResponsiveGrid(editable)

function to test if a editable is located in an responsive grid

Parameters:
Name Type Description
editable
Source:
responsive/responsive.js
Returns:
Type
boolean

<static> isResponsiveGrid(editable)

function to test if an editable is a responsive grid

Parameters:
Name Type Description
editable
Source:
responsive/responsive.js
Returns:
Type
boolean

<static> setCurrentBreakpoint(breakpoint)

Sets a breakpoint to be active

Parameters:
Name Type Description
breakpoint

name to be activated

Source:
responsive/responsive.js

<static> setDeviceBreakpoint(deviceWidth)

Sets a breakpoint active based on the passed width of the device

Parameters:
Name Type Description
deviceWidth
Source:
responsive/responsive.js