SAMYANG/m/asset/js/sy.m.plugin.js
/**
         * Performs the vertical movement (by CSS3 or by jQuery)
         */
Performs the vertical movement (by CSS3 or by jQuery)
Performs the vertical movement ( by CSS3 or by jQuery )
function performMovement(v) {
            if (options.css3 && options.autoScrolling && !options.scrollBar) {
                var translate3d = 'translate3d(0px, -' + Math.round(v.dtop) + 'px, 0px)';
                transformContainer(translate3d, true);
                if (options.scrollingSpeed) {
                    clearTimeout(afterSectionLoadsId);
                    afterSectionLoadsId = setTimeout(function () {
                        afterSectionLoads(v);
                    }, options.scrollingSpeed);
                } else {
                    afterSectionLoads(v);
                }
            }
            else {
                var scrollSettings = getScrollSettings(v);
                $(scrollSettings.element).animate(
                    scrollSettings.options,
                    options.scrollingSpeed, options.easing).promise().done(function () { 
                    if (options.scrollBar) {
                        setTimeout(function () {
                            afterSectionLoads(v);
                        }, 30);
                    } else {
                        afterSectionLoads(v);
                    }
                });
            }
        }
function performMovement ( v ) { if ( options . css3 && options . autoScrolling && ! options . scrollBar ) { var translate3d = 'translate3d(0px, -' + Math . round ( v . dtop ) + 'px, 0px)' ; transformContainer ( translate3d , true ) ; if ( options . scrollingSpeed ) { clearTimeout ( afterSectionLoadsId ) ; afterSectionLoadsId = setTimeout ( function ( ) { afterSectionLoads ( v ) ; } , options . scrollingSpeed ) ; } else { afterSectionLoads ( v ) ; } } else { var scrollSettings = getScrollSettings ( v ) ; $ ( scrollSettings . element ) . animate ( scrollSettings . options , options . scrollingSpeed , options . easing ) . promise ( ) . done ( function ( ) { if ( options . scrollBar ) { setTimeout ( function ( ) { afterSectionLoads ( v ) ; } , 30 ) ; } else { afterSectionLoads ( v ) ; } } ) ; } }
Performs the vertical movement (by CSS3 or by jQuery)
Performs the vertical movement ( by CSS3 or by jQuery )
// using CSS3 translate functionality // The first section can have a negative value in iOS 10. Not quite sure why: -0.0142822265625 // that's why we round it to 0. //even when the scrollingSpeed is 0 there's a little delay, which might cause the //scrollingSpeed to change in case of using silentMoveTo(); // using jQuery animate //only one single callback in case of animating  `html, body` /* Hack!
                        The timeout prevents setting the most dominant section in the viewport as "active" when the user
                        scrolled to a smaller section by using the mousewheel (auto scrolling) rather than draging the scroll bar.

                        When using scrollBar:true It seems like the scroll events still getting propagated even after the scrolling animation has finished.
                        */