|
1 | 1 | /*!
|
2 |
| -* fullPage 4.0.33 |
| 2 | +* fullPage 4.0.34 |
3 | 3 | * https://github.com/alvarotrigo/fullPage.js
|
4 | 4 | *
|
5 | 5 | * @license GPLv3 for open source use only
|
|
1068 | 1068 | var ACTIVE = 'active';
|
1069 | 1069 | var ACTIVE_SEL = '.' + ACTIVE;
|
1070 | 1070 | var COMPLETELY = 'fp-completely';
|
1071 |
| - var COMPLETELY_SEL = '.' + COMPLETELY; // section |
| 1071 | + var COMPLETELY_SEL = '.' + COMPLETELY; |
| 1072 | + var LOADED = 'fp-loaded'; |
1072 | 1073 |
|
1073 | 1074 | var SECTION_DEFAULT_SEL = '.section';
|
1074 | 1075 | var SECTION = 'fp-section';
|
|
1112 | 1113 | var SLIDES_ARROW_PREV_SEL = SLIDES_ARROW_SEL + SLIDES_PREV_SEL;
|
1113 | 1114 | var SLIDES_NEXT = 'fp-next';
|
1114 | 1115 | var SLIDES_NEXT_SEL = '.' + SLIDES_NEXT;
|
1115 |
| - var SLIDES_ARROW_NEXT_SEL = SLIDES_ARROW_SEL + SLIDES_NEXT_SEL; |
| 1116 | + var SLIDES_ARROW_NEXT_SEL = SLIDES_ARROW_SEL + SLIDES_NEXT_SEL; // Watermark |
| 1117 | + |
| 1118 | + var WATERMARK = 'fp-watermark'; |
| 1119 | + var WATERMARK_SEL = '.' + WATERMARK; |
1116 | 1120 |
|
1117 | 1121 | var defaultOptions = {
|
1118 | 1122 | //navigation
|
|
1605 | 1609 | if (currentTime < duration) {
|
1606 | 1610 | window.requestAnimationFrame(_g_animateScroll);
|
1607 | 1611 | } else if (typeof callback !== 'undefined' && !isCallbackFired) {
|
| 1612 | + setScrolling(element, to); |
1608 | 1613 | callback();
|
1609 | 1614 | setState({
|
1610 | 1615 | activeAnimation: false
|
|
1838 | 1843 | };
|
1839 | 1844 | }
|
1840 | 1845 | }
|
1841 |
| - }); |
| 1846 | + }); // Add fp-loaded class to the panel after lazy loading |
| 1847 | + |
| 1848 | + addClass(panel, LOADED); |
1842 | 1849 | }
|
1843 | 1850 | function lazyLoadPanels(panel) {
|
1844 | 1851 | var lazyLoadThresold = getOptions().lazyLoadThreshold;
|
|
4891 | 4898 |
|
4892 | 4899 | function bindEvents$6() {
|
4893 | 4900 | // Setting VH correctly in mobile devices
|
4894 |
| - resizeHandler(); // Initial set of VH units |
4895 |
| - |
4896 |
| - setVhUnits(); //when resizing the site, we adjust the heights of the sections, slimScroll... |
| 4901 | + resizeHandler(); //when resizing the site, we adjust the heights of the sections, slimScroll... |
4897 | 4902 |
|
4898 | 4903 | windowAddEvent('resize', resizeHandler);
|
4899 | 4904 | EventEmitter.on(events.onDestroy, onDestroy$3);
|
|
4961 | 4966 | }
|
4962 | 4967 | }
|
4963 | 4968 | }
|
| 4969 | + /** |
| 4970 | + * Checks if VH units need to be set based on scrolling configuration |
| 4971 | + */ |
| 4972 | + |
| 4973 | + |
| 4974 | + function shouldSetVhUnits() { |
| 4975 | + return !state.isBeyondFullpage && !getOptions().autoScrolling; |
| 4976 | + } |
4964 | 4977 | /**
|
4965 | 4978 | * When resizing the site, we adjust the heights of the sections, slimScroll...
|
4966 | 4979 | */
|
|
4974 | 4987 | if (!isTouchDevice || getOptions().adjustOnNavChange) {
|
4975 | 4988 | setSectionsHeight('');
|
4976 | 4989 |
|
4977 |
| - if (!getOptions().autoScrolling && !state.isBeyondFullpage) { |
| 4990 | + if (shouldSetVhUnits()) { |
4978 | 4991 | setVhUnits();
|
4979 | 4992 | }
|
4980 | 4993 | }
|
|
5094 | 5107 |
|
5095 | 5108 |
|
5096 | 5109 | function setVhUnits() {
|
5097 |
| - if (!getOptions().autoScrolling || getOptions().scrollBar) { |
5098 |
| - // First we get the viewport height and we multiple it by 1% to get a value for a vh unit |
5099 |
| - var vh = win.innerHeight * 0.01; // Then we set the value in the --vh custom property to the root of the document |
| 5110 | + // First we get the viewport height and we multiple it by 1% to get a value for a vh unit |
| 5111 | + var vh = win.innerHeight * 0.01; // Then we set the value in the --vh custom property to the root of the document |
5100 | 5112 |
|
5101 |
| - doc.documentElement.style.setProperty('--vh', "".concat(vh, "px")); |
5102 |
| - } |
| 5113 | + doc.documentElement.style.setProperty('--vh', "".concat(vh, "px")); |
5103 | 5114 | }
|
5104 | 5115 |
|
5105 | 5116 | function getAnchorsURL() {
|
|
5492 | 5503 | function init$1() {
|
5493 | 5504 | var position = getOptions().credits.position || 'right';
|
5494 | 5505 | var positionStyle = ['left', 'right'].indexOf(position) > -1 ? "".concat(position, ": 0;") : '';
|
5495 |
| - var waterMark = "\n <div class=\"fp-watermark\" style=\"".concat(positionStyle, "\">\n <a href=\"https://alvarotrigo.com/fullPage/\" \n rel=\"nofollow noopener\" \n target=\"_blank\" \n style=\"text-decoration:none; color: #000;\">\n ").concat(getOptions().credits.label || 'Made with fullPage.js', "\n </a>\n </div>\n "); |
| 5506 | + var waterMark = "\n <div class=\"".concat(WATERMARK, "\" style=\"").concat(positionStyle, "\">\n <a href=\"https://alvarotrigo.com/fullPage/\" \n rel=\"nofollow noopener\" \n target=\"_blank\" \n style=\"text-decoration:none; color: #000;\">\n ").concat(getOptions().credits.label || 'Made with fullPage.js', "\n </a>\n </div>\n "); |
5496 | 5507 | var lastSection = getLast(state.sections);
|
5497 | 5508 | var shouldUseWaterMark = !state.isValid || getOptions().credits.enabled;
|
5498 | 5509 |
|
|
5559 | 5570 | });
|
5560 | 5571 | });
|
5561 | 5572 | var t = ["-"];
|
5562 |
| - var n = "\x32\x30\x32\x35\x2d\x30\x2d\x32\x37".split("-"), |
| 5573 | + var n = "\x32\x30\x32\x35\x2d\x32\x2d\x33".split("-"), |
5563 | 5574 | e = new Date(n[0], n[1], n[2]),
|
5564 | 5575 | r = ["se", "licen", "-", "v3", "l", "gp"];
|
5565 | 5576 |
|
|
5799 | 5810 | $('img[data-srcset]').forEach(function (item) {
|
5800 | 5811 | setSrc(item, 'srcset');
|
5801 | 5812 | });
|
5802 |
| - remove($(SECTION_NAV_SEL + ', ' + SLIDES_NAV_SEL + ', ' + SLIDES_ARROW_SEL)); //removing inline styles |
| 5813 | + remove($(SECTION_NAV_SEL + ', ' + SLIDES_NAV_SEL + ', ' + SLIDES_ARROW_SEL + ', ' + WATERMARK_SEL)); //removing inline styles |
5803 | 5814 |
|
5804 | 5815 | css(getNodes(getState().sections), {
|
5805 | 5816 | 'height': '',
|
|
5835 | 5846 | scrollOverflowHandler.destroyWrapper(item);
|
5836 | 5847 | }
|
5837 | 5848 |
|
5838 |
| - removeClass(item, TABLE + ' ' + ACTIVE + ' ' + COMPLETELY + ' ' + IS_OVERFLOW); |
| 5849 | + removeClass(item, TABLE + ' ' + ACTIVE + ' ' + COMPLETELY + ' ' + IS_OVERFLOW + ' ' + LOADED); |
5839 | 5850 | var previousStyles = getAttr(item, 'data-fp-styles');
|
5840 | 5851 |
|
5841 | 5852 | if (previousStyles) {
|
|
6020 | 6031 | }; //public functions
|
6021 | 6032 |
|
6022 | 6033 |
|
6023 |
| - FP.version = '4.0.33'; |
| 6034 | + FP.version = '4.0.34'; |
6024 | 6035 | FP.test = Object.assign(FP.test, {
|
6025 | 6036 | top: '0px',
|
6026 | 6037 | translate3d: 'translate3d(0px, 0px, 0px)',
|
|
0 commit comments