This repository was archived by the owner on Feb 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +15
-13
lines changed
Expand file tree Collapse file tree 4 files changed +15
-13
lines changed Original file line number Diff line number Diff line change 11// ==================================================
2- // fancyBox v3.3.1
2+ // fancyBox v3.3.2
33//
44// Licensed GPLv3 for open source use
55// or fancyBox Commercial License for commercial use
16781678 if ( slide . isLoading && ( ! $img || ! $img [ 0 ] . complete ) && ! slide . hasError ) {
16791679 self . showLoading ( slide ) ;
16801680 }
1681- } , 300 ) ;
1681+ } , 350 ) ;
16821682
16831683 // If we have "srcset", then we need to find first matching "src" value.
16841684 // This is necessary, because when you set an src attribute, the browser will preload the image
17691769 . attr ( "src" , thumbSrc ) ;
17701770 }
17711771
1772+ // Start loading actual image
17721773 self . setBigImage ( slide ) ;
17731774 } ,
17741775
21812182
21822183 duration = parseInt ( slide . forcedDuration === undefined ? duration : slide . forcedDuration , 10 ) ;
21832184
2185+ // Do not animate if revealing the same slide
21842186 if ( slide . pos === self . currPos ) {
21852187 if ( slide . isComplete ) {
21862188 effect = false ;
22042206
22052207 // Zoom animation
22062208 // ==============
2207-
22082209 if ( effect === "zoom" ) {
22092210 end . scaleX = end . width / start . width ;
22102211 end . scaleY = end . height / start . height ;
22892290 var self = this ,
22902291 rez = false ,
22912292 $thumb = slide . opts . $thumb ,
2292- thumbPos = $thumb ? $thumb . offset ( ) : 0 ,
2293+ thumbPos = $thumb && $thumb . length && $thumb [ 0 ] . ownerDocument === document ? $thumb . offset ( ) : 0 ,
22932294 slidePos ;
22942295
22952296 // Check if element is inside the viewport by at least 1 pixel
23232324 ) ;
23242325 } ;
23252326
2326- if ( thumbPos && $thumb [ 0 ] . ownerDocument === document && isElementVisible ( $thumb ) ) {
2327+ if ( thumbPos && isElementVisible ( $thumb ) ) {
23272328 slidePos = self . $refs . stage . offset ( ) ;
23282329
23292330 rez = {
27642765 } ) ;
27652766
27662767 $ . fancybox = {
2767- version : "3.3.1 " ,
2768+ version : "3.3.2 " ,
27682769 defaults : defaults ,
27692770
27702771 // Get current instance and execute a command.
Original file line number Diff line number Diff line change 11{
22 "name" : " @fancyapps/fancybox" ,
33 "description" : " Touch enabled, responsive and fully customizable jQuery lightbox script" ,
4- "version" : " 3.3.1 " ,
4+ "version" : " 3.3.2 " ,
55 "homepage" : " http://fancyapps.com/fancybox/" ,
66 "main" : " ./dist/jquery.fancybox.js" ,
77 "author" : " fancyApps" ,
Original file line number Diff line number Diff line change 16681668 if ( slide . isLoading && ( ! $img || ! $img [ 0 ] . complete ) && ! slide . hasError ) {
16691669 self . showLoading ( slide ) ;
16701670 }
1671- } , 300 ) ;
1671+ } , 350 ) ;
16721672
16731673 // If we have "srcset", then we need to find first matching "src" value.
16741674 // This is necessary, because when you set an src attribute, the browser will preload the image
17591759 . attr ( "src" , thumbSrc ) ;
17601760 }
17611761
1762+ // Start loading actual image
17621763 self . setBigImage ( slide ) ;
17631764 } ,
17641765
21712172
21722173 duration = parseInt ( slide . forcedDuration === undefined ? duration : slide . forcedDuration , 10 ) ;
21732174
2175+ // Do not animate if revealing the same slide
21742176 if ( slide . pos === self . currPos ) {
21752177 if ( slide . isComplete ) {
21762178 effect = false ;
21942196
21952197 // Zoom animation
21962198 // ==============
2197-
21982199 if ( effect === "zoom" ) {
21992200 end . scaleX = end . width / start . width ;
22002201 end . scaleY = end . height / start . height ;
22792280 var self = this ,
22802281 rez = false ,
22812282 $thumb = slide . opts . $thumb ,
2282- thumbPos = $thumb ? $thumb . offset ( ) : 0 ,
2283+ thumbPos = $thumb && $thumb . length && $thumb [ 0 ] . ownerDocument === document ? $thumb . offset ( ) : 0 ,
22832284 slidePos ;
22842285
22852286 // Check if element is inside the viewport by at least 1 pixel
23132314 ) ;
23142315 } ;
23152316
2316- if ( thumbPos && $thumb [ 0 ] . ownerDocument === document && isElementVisible ( $thumb ) ) {
2317+ if ( thumbPos && isElementVisible ( $thumb ) ) {
23172318 slidePos = self . $refs . stage . offset ( ) ;
23182319
23192320 rez = {
You can’t perform that action at this time.
0 commit comments