Yahoo! UI Library

scrollview-scrollbars  3.2.0pr1

Yahoo! UI Library > scrollview-scrollbars > Plugin.ScrollViewScrollbars
Search:
 
Filters

Class Plugin.ScrollViewScrollbars - extends Plugin.Base

ScrollView plugin that adds scroll indicators to ScrollView instances

Constructor

Plugin.ScrollViewScrollbars ( )

Properties

ScrollViewScrollbars.ATTRS - static Object

The default attribute configuration for the plugin

ScrollViewScrollbars.NAME - static String

The identity of the plugin
Default Value: 'scrollbars-plugin'

ScrollViewScrollbars.NS - static String

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

ScrollViewScrollbars.SCROLLBAR_TEMPLATE - static Object

HTML template for the scrollbar

Properties inherited from Attribute:

Properties inherited from Base:

Properties inherited from Plugin.Base:

Methods

_hostDimensionsChange

protected void _hostDimensionsChange ( )
Set up the DOM nodes for the scrollbars. This method is invoked whenver the host's _uiDimensionsChange fires, giving us the opportunity to remove un-needed scrollbars, as well as add one if necessary.

_setHorizontalNode

protected void _setHorizontalNode ( node )
Setter for the horizontalNode attribute
Parameters:
node <Y.Node> The Y.Node instance for the scrollbar

_setVerticalNode

protected void _setVerticalNode ( node )
Setter for the verticalNode attribute
Parameters:
node <Y.Node> The Y.Node instance for the scrollbar

_show

protected void _show ( show , animated )
Internal hide/show implementation utility method
Parameters:
show <Object>
animated <Object>

_update

protected void _update ( currentPos , duration , easing )
Position and resize the scroll bars according to the content size
Parameters:
currentPos <Number> The current scrollX or scrollY value (not used here, but passed by default from _uiScrollX/_uiScrollY)
duration <Number> Number of ms of animation (optional) - used when snapping to bounds
easing <String> Optional easing equation to use during the animation, if duration is set

flash

void flash ( )
Momentarily flash the scroll bars to indicate current scroll position

hide

void hide ( animated )
Hide the scroll bar indicators
Parameters:
animated <Boolean> Whether or not to animate the hiding

initializer

void initializer ( )
Designated initializer

show

void show ( animated )
Show the scroll bar indicators
Parameters:
animated <Boolean> Whether or not to animate the showing

Events

horizontalNodeChange

horizontalNodeChange ( event )
Fires when the value for the configuration attribute 'horizontalNode' 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

verticalNodeChange

verticalNodeChange ( event )
Fires when the value for the configuration attribute 'verticalNode' 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

horizontalNode - Y.Node

Horizontal scrollbar node

verticalNode - Y.Node

Vertical scrollbar node

Configuration attributes inherited from Base:

Configuration attributes inherited from Plugin.Base:


Copyright © 2010 Yahoo! Inc. All rights reserved.