Browse Source

Fix math on scroll context

pull/5122/merge
Jack Lukic 7 years ago
parent
commit
064477c47d
1 changed files with 2 additions and 2 deletions
  1. 4
      src/definitions/behaviors/visibility.js

4
src/definitions/behaviors/visibility.js

@ -887,10 +887,10 @@ $.fn.visibility = function(parameters) {
element.height = $module.outerHeight();
// compensate for scroll in context
if(module.is.verticallyScrollableContext()) {
element.offset.top += $context.scrollTop();
element.offset.top += $context.scrollTop() - $context.offset().top;
}
if(module.is.horizontallyScrollableContext()) {
element.offset.left += $context.scrollLeft();
element.offset.left += $context.scrollLeft - $context.offset().left;
}
// store
module.cache.element = element;

Loading…
Cancel
Save