Browse Source

Fixes issue with visibility type image re-animating when reinitialized

pull/4731/merge
Jack Lukic 8 years ago
parent
commit
b9d402d62b
2 changed files with 8 additions and 2 deletions
  1. 1
      RELEASE-NOTES.md
  2. 9
      src/definitions/behaviors/visibility.js

1
RELEASE-NOTES.md

@ -32,6 +32,7 @@
- **Form Validation** - Fixes js error caused by revalidating inputs without validation rules #4497 #4547 **Thanks @cbxp**
- **Input/Dropdown** - Fixed rounding error causing vertical alignment of `dropdown`, `search`, `input` to sometimes appear off by 1 pixel #4279
- **Segment** - Fixed `padded vertical segment` `very padded vertical segment` would receive horizontal padding #3012
- **Visibility* - Fixes issue where reinitializing, `.visibility({ type: 'image'})` will cause it to re-animate when visibile again
**Documentation**
- **Visibility** - Added documentation for `onOnscreen` and `onOffScreen` to important callbacks somehow omitted from docs

9
src/definitions/behaviors/visibility.js

@ -387,7 +387,11 @@ $.fn.visibility = function(parameters) {
.attr('src', src)
;
if(settings.transition) {
if( $.fn.transition !== undefined ) {
if( $.fn.transition !== undefined) {
if($module.hasClass(className.visible)) {
module.debug('Transition already occurred on this image, skipping animation');
return;
}
$module.transition(settings.transition, settings.duration, callback);
}
else {
@ -1270,7 +1274,8 @@ $.fn.visibility.settings = {
className: {
fixed : 'fixed',
placeholder : 'placeholder'
placeholder : 'placeholder',
visible : 'visible'
},
error : {

Loading…
Cancel
Save