Show:

Mixin: Floated

Floated

Floated mixin class.

Extends

Methods

private_addRule(sheet, selector, css_text){Floated}

mixins/Floated.js, line 200

Inserts a style rule to a given style sheet.

Name Type Description
sheet CSSStyleSheet

a style sheet object.

selector string

a CSS query selector.

css_text string

style attributes.

private_parsePosition(position){string}

mixins/Floated.js, line 180

Parses an Object containing style attributes into a string.

Name Type Description
position Object

a map of style attributes to values, either numbers or strings.

Returns:
parsed CSS text.

private_setRule(css_text){Floated}

mixins/Floated.js, line 146

Inserts a parsed CSS text as a CSS rule to the document.

Name Type Description
css_text string

parsed CSS text for positioning the floated element.

appear(){Floated}

mixins/Floated.js, line 86

Returns the elements back to its floating position.

disappear(){Floated}

mixins/Floated.js, line 102

Throws the element away from the viewport, by default this is up to outer space.

floatPosition(position){Floated}

mixins/Floated.js, line 125

Parses a given position and sets it as a CSS rule in the document.

Name Type Description
position string | Object

style attributes for positioning the floated element.

position(){Floated}

mixins/Floated.js, line 66

Positions the floating element.

Related options:

  • float_position: an Object or string representing the position to use for the element.

prepareElement(){Floated}

mixins/Floated.js, line 31

Initializes the floating state using by calling Floated#setFloat.

setFloat(){Floated}

mixins/Floated.js, line 46

Enables floating state. Sets this.floating to true, and adds the float class to the top container element. Floated instances are BaseWidget#_wrap'ed by default.