Mixin: Scrolled


Scrolled mixin class.




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.


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.


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.


mixins/Scrolled.js, line 109

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


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.


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.


mixins/Scrolled.js, line 51

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


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.


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.


mixins/Scrolled.js, line 63

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