Show:

Mixin: Scrolled

Scrolled

Scrolled mixin class.

Extends

Methods

private_getSize(){Object}

mixins/Scrolled.js, line 148

Gets the size of a widget's element, taking its child elements into account.

Related options:

  • horizontal: controls size calculation - height of a single child element and width of all children when true, or vise versa if falsy.

private_prepareScrolledSize(){Scrolled}

mixins/Scrolled.js, line 189

Ensures this.$element wraps around its content.

Related options:

  • horizontal: if true makes sure that the element's width stretches to the width of its content.
  • grid_layout: disables the above stretching.

private_setWrapperSize(clear){Scrolled}

mixins/Scrolled.js, line 210

Ensures this.$wrapper wraps around this.$element.

Name Type Description
clear boolean optional

if true then the dirty styles set on this.$wrapper are cleared.

appear(){Scrolled}

mixins/Scrolled.js, line 109

Initializes scrolling and ensures the container element wraps the element properly.

disappear(no_transitions){Scrolled}

mixins/Scrolled.js, line 127

Destroys the scroller and resets the container's size.

Name Type Description
no_transitions boolean optional

supplied to the _super() call.

prepareElement(){Scrolled}

mixins/Scrolled.js, line 32

Prepares the element to be scrolled in a wrapping container.

Related options:

  • horizontal: if true then the horizontal class is added to the element.

scroll(){Scrolled}

mixins/Scrolled.js, line 51

Initializes the scroller or refreshes it. A stub noop to be implemented by a scrolling library adapter.

scrollTo(position){*}

mixins/Scrolled.js, line 97

Scrolls the element in its container. To be implemented by the scrolling library adapter.

Name Type Description
position * optional

any parameter that can determine the position to scroll to, depending on implementation of scrolling library.

scrollToggle(switch_on){Scrolled}

mixins/Scrolled.js, line 78

Toggles scroller on and off, initializing or destroying it. If switch_on is provided then if it's true Scrolled#scroll is invoked, if false then Scrolled#unscroll. If switch_on is omitted then the state is simply toggled.

Name Type Description
switch_on boolean optional

forces toggle to initialize or destroy.

unscroll(){Scrolled}

mixins/Scrolled.js, line 63

Destroys the scroller. A stub noop to be implemented by a scrolling library adapter.