Yahoo! UI Library

scrollview-paginator  3.3.0pr1

Yahoo! UI Library > scrollview-paginator > Plugin.ScrollViewPaginator
Search:
 
Filters

Class Plugin.ScrollViewPaginator - extends Plugin.Base

Scrollview plugin that adds support for paging

Constructor

Plugin.ScrollViewPaginator ( )

Properties

ScrollViewPaginator.ATTRS - static Object

The default attribute configuration for the plugin

ScrollViewPaginator.NAME - static String

The identity of the plugin
Default Value: 'paginatorPlugin'

ScrollViewPaginator.NS - static String

The namespace on which the plugin will reside
Default Value: 'pages'

Properties inherited from Plugin.Host:

Properties inherited from Attribute:

Properties inherited from Base:

Properties inherited from Plugin.Base:

Methods

_afterIndexChange

protected void _afterIndexChange ( )
index attr change handler

_afterRender

protected void _afterRender ( )
After host render handler

_calcOffsets

protected void _calcOffsets ( )
Calculate the page boundary offsets

_flickFrame

protected void _flickFrame ( )
Executed to respond to the flick event, by over-riding the default flickFrame animation. This is needed to determine if the next or prev page should be activated.

_scrollEnded

protected void _scrollEnded ( )
scrollEnd handler detects if a page needs to change

_uiIndex

protected void _uiIndex ( )
Update the UI based on the current page index

initializer

void initializer ( )
Designated initializer

next

void next ( )
Scroll to the next page in the scrollview, with animation

prev

void prev ( )
Scroll to the previous page in the scrollview, with animation

scrollTo

void scrollTo ( index , duration , easing )
Scroll to a given page in the scrollview, with animation.
Parameters:
index <Number> The index of the page to scroll to
duration <Number> The number of ms the animation should last
easing <String> The timing function to use in the animation

snapToCurrent

void snapToCurrent ( )
Snaps the scrollview to the currently selected page

Events

indexChange

indexChange ( event )
Fires when the value for the configuration attribute 'index' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

selectorChange

selectorChange ( event )
Fires when the value for the configuration attribute 'selector' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

totalChange

totalChange ( event )
Fires when the value for the configuration attribute 'total' is changed. You can listen for the event using the on method if you wish to be notified before the attribute's value has changed, or using the after method if you wish to be notified after the attribute's value has changed.
Parameters:
event <Event.Facade> An Event Facade object with the following attribute specific properties added:
prevVal
The value of the attribute, prior to it being set
newVal
The value the attribute is to be set to
attrName
The name of the attribute being set
subAttrName
If setting a property within the attribute's value, the name of the sub-attribute property being set

Events inherited from Base:

Events inherited from Plugin.Base:

Configuration Attributes

index - {Number}

The active page number for a paged scrollview
Default Value: 0

selector - {String}

CSS selector for a page inside the scrollview. The scrollview will snap to the closest page.

total - {Number}

The total number of pages
Default Value: 0

Configuration attributes inherited from Base:

Configuration attributes inherited from Plugin.Base:


Copyright © 2010 Yahoo! Inc. All rights reserved.