Class: ScrollContainer

ScrollContainer

ScrollContainer

new GOWN.ScrollContainer(theme)

ScrollContainer (not implemented yet)
Name Type Description
theme GOWN.Theme optional theme for the scroll container

Extends

Members

_clipContent

use mask to clip content

_interactionMode

the default interaction mode is drag-and-drop OR use the scrollbars

_scrollPosition

calculated horizontal and vertical scroll positions

_startScrollPosition

scroll positions at the start of an interaction (changed on touchstart/mousedown)

_startTouch

start touch/mouse position (changed on touchstart/mousedown)

_verticalScrollPolicy

scroll policy for vertical and horizontal ScrollBar (translates to x/y position of the viewport and scroll positions)

_viewPortOffset

offsets for the mask of the viewport (see this._viewport.mask)

enabledBoolean

Enables/Disables the control. (not implemented yet)

scrollInvalid

scrollInvalid will force viewport to set its x/y position according to horizontal/vertical Scroll Position next redraw

Methods

inherited _throwToTween(targetPosition, direction, duration)

manage tween to throw to horizontal or vertical position call finishScrolling when tween reaches the end position
Name Type Description
targetPosition number target position in pixel
direction String direction ('horizontal' or 'vertical')
duration number time needed to reach target position (in ms)
Creates and adds the horizontalScrollBar and verticalScrollBar sub-components and removes the old instances, if they exist.

Meant for internal use, and subclasses may override this function with a custom implementation.

See:

inherited mousePos(){PIXI.Point}

Get the local mouse position from PIXI.InteractionData
Returns:
Type Description
PIXI.Point
update before draw call
update the rectangle that defines the clipping area

inherited setTheme(theme)

Change the theme (every control can have a theme, even if it does not inherit Skinable, e.g. if there is only some color in the skin that will be taken or if it has some skinable components as children)
Name Type Description
theme GOWN.Theme the new theme

inherited throwTo(targetHorizontalScrollPosition, targetVerticalScrollPosition, duration)

throw the scroller to the specified position
Name Type Description
targetHorizontalScrollPosition as PIXI.Point
targetVerticalScrollPosition as PIXI.Point
duration