Skip to content
This repository has been archived by the owner on Dec 2, 2022. It is now read-only.

Commit

Permalink
Fix #718.
Browse files Browse the repository at this point in the history
  • Loading branch information
gjb2048 committed Aug 19, 2016
1 parent a6a9219 commit fd62115
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ New in 3.0.1.8
==============
- FIX: Issue #710: Wrong profile image used.
- FIX: Issue #711: Space when blocks are docked.
- FIX: Issue #718: Affix top offset height when reload down page..

New in 3.0.1.7
==============
Expand Down
2 changes: 1 addition & 1 deletion amd/build/affix.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
* @copyright 2015 Gareth J Barnard
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
define(["jquery","theme_essential/bootstrap","core/log"],function(a,b,c){"use strict";return c.debug("Essential affix AMD"),{init:function(){a(document).ready(function(a){if(a("#essentialnavbar").length){var b=a("#essentialnavbar"),d=b.offset().top;c.debug("Essential affix AMD offset: "+d);var e=a("#page-header").height();c.debug("Essential affix AMD pageheaderHeight: "+e),b.affix({offset:{top:function(){var f=a(window).scrollTop();c.debug("Essential affix AMD wst: "+f);var g=e-f;return c.debug("Essential affix AMD diff: "+g),0>g&&(g=0),b.css("top",g+"px"),d}}})}}),c.debug("Essential affix AMD init")}}});
define(["jquery","theme_essential/bootstrap","core/log"],function(a,b,c){"use strict";return c.debug("Essential affix AMD"),{init:function(){a(document).ready(function(a){if(a("#essentialnavbar").length){var b=a("#essentialnavbar"),d=a("#page-header").height();c.debug("Essential affix AMD pageheaderHeight: "+d),b.affix({offset:{top:function(){var e=a(window).scrollTop();c.debug("Essential affix AMD wst: "+e);var f=d-e;return c.debug("Essential affix AMD diff: "+f),0>f&&(f=0),b.css("top",f+"px"),d}}})}}),c.debug("Essential affix AMD init")}}});
4 changes: 1 addition & 3 deletions amd/src/affix.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ define(['jquery', 'theme_essential/bootstrap', 'core/log'], function($, boot, lo
$(document).ready(function($) {
if ($('#essentialnavbar').length) {
var $essentialnavbar = $('#essentialnavbar');
var offset = $essentialnavbar.offset().top;
log.debug('Essential affix AMD offset: ' + offset);
var pageheaderHeight = $('#page-header').height();
log.debug('Essential affix AMD pageheaderHeight: ' + pageheaderHeight);
$essentialnavbar.affix({
Expand All @@ -34,7 +32,7 @@ define(['jquery', 'theme_essential/bootstrap', 'core/log'], function($, boot, lo
diff = 0;
}
$essentialnavbar.css('top', diff + 'px');
return offset;
return pageheaderHeight;
}
}
});
Expand Down

0 comments on commit fd62115

Please sign in to comment.