Browse Source

Fix bug with top passed bottom passed in visibility

pull/5122/merge
Jack Lukic 8 years ago
parent
commit
415a67dedb
2 changed files with 4 additions and 3 deletions
  1. 3
      RELEASE-NOTES.md
  2. 4
      src/definitions/behaviors/visibility.js

3
RELEASE-NOTES.md

@ -11,7 +11,8 @@
### Version 2.2.10 - February 21, 2017
**Bugs**
**Visibility** - Fixed bug where using visibility with `context` setting on a scrollable context (with overflow) would cause callbacks to fire incorrectly
- **Visibility** - Fixed bug where using visibility with `context` setting on a scrollable context (with overflow) would cause callbacks to fire incorrectly
- **Visibility** - Fixed bug where `top passed` and `bottom passed` would appear as incorrect values if using settings from `get element calculations` when element is off screen.
### Version 2.2.9 - February 21, 2017

4
src/definitions/behaviors/visibility.js

@ -915,10 +915,10 @@ $.fn.visibility = function(parameters) {
}
// visibility
element.topVisible = (screen.bottom >= element.top);
element.topPassed = (screen.top >= element.top);
element.bottomVisible = (screen.bottom >= element.bottom);
element.bottomPassed = (screen.top >= element.bottom);
element.topVisible = (screen.bottom >= element.top) && !element.bottomPassed;
element.bottomVisible = (screen.bottom >= element.bottom) && !element.topPassed;
element.pixelsPassed = 0;
element.percentagePassed = 0;

Loading…
Cancel
Save