|
1 | 1 | /*! |
2 | 2 | * fancyBox - jQuery Plugin |
3 | | - * version: 2.0.5 (14/04/2012) |
| 3 | + * version: 2.0.6 (16/04/2012) |
4 | 4 | * @requires jQuery v1.6 or later |
5 | 5 | * |
6 | 6 | * Examples at http://fancyapps.com/fancybox/ |
|
18 | 18 | F = $.fancybox = function () { |
19 | 19 | F.open.apply( this, arguments ); |
20 | 20 | }, |
21 | | - didResize = false, |
22 | | - resizeTimer = null, |
23 | | - isTouch = document.createTouch !== undefined, |
24 | | - isString = function(str) { |
| 21 | + didResize = false, |
| 22 | + resizeTimer = null, |
| 23 | + isTouch = document.createTouch !== undefined, |
| 24 | + isString = function(str) { |
25 | 25 | return $.type(str) === "string"; |
26 | 26 | }, |
27 | 27 | isPercentage = function(str) { |
|
59 | 59 |
|
60 | 60 | fixed: false, |
61 | 61 | scrolling: 'auto', // 'auto', 'yes' or 'no' |
62 | | - wrapCSS: 'fancybox-default', |
| 62 | + wrapCSS: '', |
63 | 63 |
|
64 | 64 | arrows: true, |
65 | 65 | closeBtn: true, |
|
486 | 486 | } |
487 | 487 | }, |
488 | 488 |
|
489 | | - trigger: function (event, obj) { |
490 | | - var ret, obj = obj || F[ $.inArray(event, ['onCancel', 'beforeLoad', 'afterLoad']) > -1 ? 'coming' : 'current' ]; |
| 489 | + trigger: function (event, o) { |
| 490 | + var ret, obj = o || F[ $.inArray(event, ['onCancel', 'beforeLoad', 'afterLoad']) > -1 ? 'coming' : 'current' ]; |
491 | 491 |
|
492 | 492 | if (!obj) { |
493 | 493 | return; |
|
675 | 675 | $.extend(F.coming, { |
676 | 676 | type : 'html', |
677 | 677 | autoSize : true, |
| 678 | + minWidth : 0, |
678 | 679 | minHeight : 0, |
| 680 | + padding : 15, |
679 | 681 | hasError : type, |
680 | 682 | content : F.coming.tpl.error |
681 | 683 | }); |
|
930 | 932 | }, |
931 | 933 |
|
932 | 934 | _setDimension: function () { |
933 | | - var wrap = F.wrap, |
934 | | - inner = F.inner, |
935 | | - current = F.current, |
936 | | - viewport = F.getViewport(), |
937 | | - margin = current.margin, |
938 | | - padding2 = current.padding * 2, |
939 | | - width = current.width, |
940 | | - height = current.height, |
941 | | - maxWidth = current.maxWidth + padding2, |
| 935 | + var wrap = F.wrap, |
| 936 | + inner = F.inner, |
| 937 | + current = F.current, |
| 938 | + viewport = F.getViewport(), |
| 939 | + margin = current.margin, |
| 940 | + padding2 = current.padding * 2, |
| 941 | + width = current.width, |
| 942 | + height = current.height, |
| 943 | + maxWidth = current.maxWidth + padding2, |
942 | 944 | maxHeight = current.maxHeight + padding2, |
943 | | - minWidth = current.minWidth + padding2, |
| 945 | + minWidth = current.minWidth + padding2, |
944 | 946 | minHeight = current.minHeight + padding2, |
945 | 947 | ratio, |
946 | 948 | height_; |
|
961 | 963 | height += padding2; |
962 | 964 |
|
963 | 965 | if (current.fitToView) { |
964 | | - maxWidth = Math.min(viewport.w, maxWidth); |
| 966 | + maxWidth = Math.min(viewport.w, maxWidth); |
965 | 967 | maxHeight = Math.min(viewport.h, maxHeight); |
966 | 968 | } |
967 | 969 |
|
|
1239 | 1241 | .show() |
1240 | 1242 | .animate(endPos, { |
1241 | 1243 | duration : effect === 'none' ? 0 : current.openSpeed, |
1242 | | - easing : current.openEasing, |
1243 | | - step: elastic ? this.step : null, |
1244 | | - complete: F._afterZoomIn |
| 1244 | + easing : current.openEasing, |
| 1245 | + step : elastic ? this.step : null, |
| 1246 | + complete : F._afterZoomIn |
1245 | 1247 | }); |
1246 | 1248 | }, |
1247 | 1249 |
|
|
1265 | 1267 | } |
1266 | 1268 |
|
1267 | 1269 | wrap.animate(endPos, { |
1268 | | - duration: effect === 'none' ? 0 : current.closeSpeed, |
1269 | | - easing: current.closeEasing, |
1270 | | - step: elastic ? this.step : null, |
1271 | | - complete: F._afterZoomOut |
| 1270 | + duration : effect === 'none' ? 0 : current.closeSpeed, |
| 1271 | + easing : current.closeEasing, |
| 1272 | + step : elastic ? this.step : null, |
| 1273 | + complete : F._afterZoomOut |
1272 | 1274 | }); |
1273 | 1275 | }, |
1274 | 1276 |
|
|
1291 | 1293 | .show() |
1292 | 1294 | .animate(endPos, { |
1293 | 1295 | duration : effect === 'none' ? 0 : current.nextSpeed, |
1294 | | - easing : current.nextEasing, |
1295 | | - complete: function() { |
1296 | | - //Somehow this helps to restore overflow |
1297 | | - setTimeout( F._afterZoomIn, 1); |
1298 | | - } |
| 1296 | + easing : current.nextEasing, |
| 1297 | + complete : F._afterZoomIn |
1299 | 1298 | }); |
1300 | 1299 | }, |
1301 | 1300 |
|
|
1315 | 1314 | } |
1316 | 1315 |
|
1317 | 1316 | wrap.animate(endPos, { |
1318 | | - duration: effect === 'none' ? 0 : current.prevSpeed, |
1319 | | - easing: current.prevEasing, |
1320 | | - complete: cleanUp |
| 1317 | + duration : effect === 'none' ? 0 : current.prevSpeed, |
| 1318 | + easing : current.prevEasing, |
| 1319 | + complete : cleanUp |
1321 | 1320 | }); |
1322 | 1321 | } |
1323 | 1322 | }; |
|
0 commit comments