8346e283ad797ef549be70335d3961f4324901baRyan Grove * @module node
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @submodule node-base
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Makes the node visible.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * If the "transition" module is loaded, show optionally
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * animates the showing of the node using either the default
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * transition effect ('fadeIn'), or the given named effect.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method show
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {String} name A named Transition effect to use as the show effect.
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {Object} config Options to use with the transition.
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {Function} callback An optional function to run after the transition completes.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return this;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * The implementation for showing nodes.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Default is to toggle the style.display property.
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @method _show
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @protected
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney _show: function() {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return Y.DOM.getStyle(this._node, 'display') === 'none';
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * Displays or hides the node.
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * If the "transition" module is loaded, toggleView optionally
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * animates the toggling of the node using either the default
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * transition effect ('fadeIn'), or the given named effect.
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * @method toggleView
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * @param {Boolean} [on] An optional boolean value to force the node to be shown or hidden
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * @param {Function} [callback] An optional function to run after the transition completes.
8346e283ad797ef549be70335d3961f4324901baRyan Grove // base on current state if not forcing
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return this;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Hides the node.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * If the "transition" module is loaded, hide optionally
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * animates the hiding of the node using either the default
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * transition effect ('fadeOut'), or the given named effect.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method hide
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {String} name A named Transition effect to use as the show effect.
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {Object} config Options to use with the transition.
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {Function} callback An optional function to run after the transition completes.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney return this;
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * The implementation for hiding nodes.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Default is to toggle the style.display property.
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @method _hide
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @protected
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney _hide: function() {
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Makes each node visible.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * If the "transition" module is loaded, show optionally
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * animates the showing of the node using either the default
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * transition effect ('fadeIn'), or the given named effect.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method show
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {String} name A named Transition effect to use as the show effect.
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {Object} config Options to use with the transition.
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {Function} callback An optional function to run after the transition completes.
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @for NodeList
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * Hides each node.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * If the "transition" module is loaded, hide optionally
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * animates the hiding of the node using either the default
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * transition effect ('fadeOut'), or the given named effect.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @method hide
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {String} name A named Transition effect to use as the show effect.
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {Object} config Options to use with the transition.
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @param {Function} callback An optional function to run after the transition completes.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney * @chainable
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * Displays or hides each node.
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * If the "transition" module is loaded, toggleView optionally
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * animates the toggling of the nodes using either the default
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * transition effect ('fadeIn'), or the given named effect.
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * @method toggleView
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * @param {Boolean} [on] An optional boolean value to force the nodes to be shown or hidden
b89fb6c1c300b2d7138d80360f249c8c192da700Juan Ignacio Dopazo * @param {Function} [callback] An optional function to run after the transition completes.
8ff167b366d7ee96cfc801bb01cd93e3ce573cbfMatt Sweeney 'toggleView'