Class Plugin.ScrollViewScrollbars
- extends Plugin.Base
ScrollView plugin that adds scroll indicators to ScrollView instances
Constructor
Plugin.ScrollViewScrollbars
(
)
Properties
The default attribute configuration for the plugin
The identity of the plugin
Default Value: 'scrollbars-plugin'
The namespace on which the plugin will reside.
Default Value: 'scrollbars'
HTML template for the scrollbar
Properties inherited from Base:
Methods
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.
protected
void
_setHorizontalNode
(
node
)
Setter for the horizontalNode attribute
- Parameters:
-
node
<Y.Node>
The Y.Node instance for the scrollbar
protected
void
_setVerticalNode
(
node
)
Setter for the verticalNode attribute
- Parameters:
-
node
<Y.Node>
The Y.Node instance for the scrollbar
protected
void
_show
(
show
,
animated
)
Internal hide/show implementation utility method
- Parameters:
-
show
<Object>
-
animated
<Object>
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
void
flash
(
)
Momentarily flash the scroll bars to indicate current scroll position
void
hide
(
animated
)
Hide the scroll bar indicators
- Parameters:
-
animated
<Boolean>
Whether or not to animate the hiding
void
initializer
(
)
Designated initializer
void
show
(
animated
)
Show the scroll bar indicators
- Parameters:
-
animated
<Boolean>
Whether or not to animate the showing
Methods inherited from EventTarget:
_getType,
_monitor,
_parseType,
addTarget,
after,
before,
bubble,
detach,
detachAll,
fire,
getEvent,
getTargets,
on,
once,
publish,
removeTarget,
subscribe,
unsubscribe,
unsubscribeAll
Methods inherited from Attribute:
_addAttrs,
_addLazyAttr,
_defAttrChangeFn,
_fireAttrChange,
_getAttr,
_getAttrCfg,
_getAttrInitVal,
_getAttrs,
_getStateVal,
_isLazyAttr,
_normAttrVals,
_protectAttrs,
_set,
_setAttr,
_setAttrs,
_setAttrVal,
_setStateVal,
addAttr,
addAttrs,
attrAdded,
get,
getAttrs,
modifyAttr,
removeAttr,
reset,
set,
setAttrs
Methods inherited from Base:
_aggregateAttrs,
_defDestroyFn,
_defInitFn,
_destroyHierarchy,
_filterAttrCfs,
_getAttrCfgs,
_getClasses,
_initHierarchy,
_initHierarchyData,
_preInitEventCfg,
destroy,
init,
toString
Events
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
(
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:
Configuration Attributes
Horizontal scrollbar node
Configuration attributes inherited from Base: