scrollbars-plugin.js revision 13718c2f930599c3ce09d8195a96d720a03ed86a
3449N/A * Provides a plugin, which adds support for a scroll indicator to ScrollView instances 3449N/A * @module scrollview-scrollbars * ScrollView plugin that adds scroll indicators to ScrollView instances * @class ScrollViewScrollbars * The identity of the plugin * @property ScrollViewScrollbars.NAME * @default 'pluginScrollViewScrollbars' * The namespace on which the plugin will reside. * @property ScrollViewScrollbars.NS * HTML template for the scrollbar * @property ScrollViewScrollbars.SCROLLBAR_TEMPLATE * The default attribute configuration for the plugin * @property ScrollViewScrollbars.ATTRS * Vertical scrollbar node * @attribute verticalNode * Horizontal scrollbar node * @attribute horizontalNode * Set up the DOM nodes for the scrollbars. This method is invoked whenever the * host's _uiDimensionsChange fires, giving us the opportunity to remove un-needed * scrollbars, as well as add one if necessary. * @method _hostDimensionsChange Y.
later(
500,
this,
'flash',
true);
* Handler for the scrollEnd event fired by the host. Default implementation flashes the scrollbar * @param {Event.Facade} e The event facade. * Adds or removes a scrollbar node from the document. * @param {Node} bar The scrollbar node * @param {boolean} add true, to add the node, false to remove it * Caches scrollbar child element information, * to optimize _update implementation * @method _clearChildCache * Utility method, to move/resize either vertical or horizontal scrollbars * @param {Node} scrollbar The scrollbar node. * @param {Number} current The current scroll position. * @param {Number} duration The transition duration. * @param {boolean} horiz true if horizontal, false if vertical. // Resize Scrollbar Middle Child * Position and resize the scroll bars according to the content size * @param currentPos {Number} The current scrollX or scrollY value (not used here, but passed by default from _uiScrollX/_uiScrollY) * @param duration {Number} Number of ms of animation (optional) - used when snapping to bounds * @param easing {String} Optional easing equation to use during the animation, if duration is set * Show the scroll bar indicators * @param animated {Boolean} Whether or not to animate the showing * Hide the scroll bar indicators * @param animated {Boolean} Whether or not to animate the hiding * Internal hide/show implementation utility method * @param {boolean} show Whether to show or hide the scrollbar * @param {bolean} animated Whether or not to animate while showing/hide * Momentarily flash the scroll bars to indicate current scroll position * Setter for the verticalNode and horizontalNode attributes * @param node {Node} The Y.Node instance for the scrollbar * @param name {String} The attribute name * @return {Node} The Y.Node instance for the scrollbar