From 44e143b027af1dd9449672bee74bc9d98f6bdac4 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Sun, 27 Apr 2014 16:38:03 +0200 Subject: [PATCH] jquery.footHovzer: Add jsduck documentation Change-Id: I554a64951e47b2d8aa0a791619337f4b96e94f48 --- maintenance/jsduck/config.json | 1 + resources/src/jquery/jquery.footHovzer.js | 51 ++++++++++++++++------- 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/maintenance/jsduck/config.json b/maintenance/jsduck/config.json index 019701274c..344e5c2f03 100644 --- a/maintenance/jsduck/config.json +++ b/maintenance/jsduck/config.json @@ -24,6 +24,7 @@ "../../resources/src/jquery/jquery.checkboxShiftClick.js", "../../resources/src/jquery/jquery.client.js", "../../resources/src/jquery/jquery.colorUtil.js", + "../../resources/src/jquery/jquery.footHovzer.js", "../../resources/src/jquery/jquery.getAttrs.js", "../../resources/src/jquery/jquery.localize.js", "../../resources/src/jquery/jquery.makeCollapsible.js", diff --git a/resources/src/jquery/jquery.footHovzer.js b/resources/src/jquery/jquery.footHovzer.js index 56fc32d492..de745c3360 100644 --- a/resources/src/jquery/jquery.footHovzer.js +++ b/resources/src/jquery/jquery.footHovzer.js @@ -1,14 +1,5 @@ /** - * Utility to stack stuff in an overlay fixed on the bottom of the page. - * - * Usage: - * - * var hovzer = $.getFootHovzer(); - * hovzer.$.append( $myCollection ); - * hovzer.update(); - * - * - * @author Timo Tijhof, 2012 + * @class jQuery.plugin.footHovzer */ ( function ( $ ) { var $hovzer, footHovzer, prevHeight, newHeight; @@ -20,13 +11,43 @@ return $hovzer; } + /** + * Utility to stack stuff in an overlay fixed on the bottom of the page. + * + * Usage: + * + * var hovzer = $.getFootHovzer(); + * hovzer.$.append( $myCollection ); + * hovzer.update(); + * + * @static + * @inheritable + * @return {jQuery.footHovzer} + */ + $.getFootHovzer = function () { + footHovzer.$ = getHovzer(); + return footHovzer; + }; + + /** + * @private + * @class jQuery.footHovzer + */ footHovzer = { + + /** + * @property {jQuery} $ The stack container + */ + + /** + * Update dimensions of stack to account for changes in the subtree. + */ update: function () { var $body; $body = $( 'body' ); if ( prevHeight === undefined ) { - prevHeight = getHovzer().outerHeight( /*includeMargin=*/true ); + prevHeight = getHovzer().outerHeight( /* includeMargin = */ true ); $body.css( 'paddingBottom', '+=' + prevHeight + 'px' ); } else { newHeight = getHovzer().outerHeight( true ); @@ -37,9 +58,9 @@ } }; - $.getFootHovzer = function () { - footHovzer.$ = getHovzer(); - return footHovzer; - }; + /** + * @class jQuery + * @mixins jQuery.plugin.footHovzer + */ }( jQuery ) ); -- 2.20.1