SAMYANG/m/asset/js/sy.m.plugin.js
/**
         * Adds sections before or after the current one to create the infinite effect.
         */
Adds sections before or after the current one to create the infinite effect.
Adds sections before or after the current one to create the infinite effect .
function createInfiniteSections(v) {
            if (!v.isMovementUp) {
                $(SECTION_ACTIVE_SEL).after(v.activeSection.prevAll(SECTION_SEL).get().reverse());
            }
            else { 
                $(SECTION_ACTIVE_SEL).before(v.activeSection.nextAll(SECTION_SEL));
            }
            silentScroll($(SECTION_ACTIVE_SEL).position().top);
            keepSlidesPosition();
            v.wrapAroundElements = v.activeSection;
            v.dtop = v.element.position().top;
            v.yMovement = getYmovement(v.element);
            v.leavingSection = v.activeSection.index(SECTION_SEL) + 1;
            v.sectionIndex = v.element.index(SECTION_SEL);
            return v;
        }
function createInfiniteSections ( v ) { if ( ! v . isMovementUp ) { $ ( SECTION_ACTIVE_SEL ) . after ( v . activeSection . prevAll ( SECTION_SEL ) . get ( ) . reverse ( ) ) ; } else { $ ( SECTION_ACTIVE_SEL ) . before ( v . activeSection . nextAll ( SECTION_SEL ) ) ; } silentScroll ( $ ( SECTION_ACTIVE_SEL ) . position ( ) . top ) ; keepSlidesPosition ( ) ; v . wrapAroundElements = v . activeSection ; v . dtop = v . element . position ( ) . top ; v . yMovement = getYmovement ( v . element ) ; v . leavingSection = v . activeSection . index ( SECTION_SEL ) + 1 ; v . sectionIndex = v . element . index ( SECTION_SEL ) ; return v ; }
Adds sections before or after the current one to create the infinite effect.
Adds sections before or after the current one to create the infinite effect .
// Scrolling down // Move all previous sections to after the active section // Scrolling up // Move all next sections to before the active section // Maintain the displayed position (now that we changed the element order) // Maintain the active slides visible in the viewport // save for later the elements that still need to be reordered // Recalculate animation variables //sections will temporally have another position in the DOM //updating this values in case we need them