Fullpage.js: Disable touch gesture (only)

Created on 24 Jun 2017  路  5Comments  路  Source: alvarotrigo/fullPage.js

Hi,
Is any way to disable only touch gesture in section with normal scroll? I need to allow user scrolling only by mouse wheel.

question

All 5 comments

in section with normal scroll

You mean, with scrollOverflow:true? Or with normalScrollElements?

With scrollOverflow

fullPage.js doesn't provide any option to do so. But take a look to the iScroll.js docs (vendor library used when using scrollOverflow:true) to see if you find anythign to accomplish that and then pass it to the scrollOverflowOptions option in fullPage.js.

Thank you for your respond. Just one question - I need to initialize iScroll or only scrollOverflowOption: "disableTouch: true"?

As can be seen on the source code the default fullPage.js options for iScroll.js are the following:

    // Default options for iScroll.js used when using scrollOverflow
    var iscrollOptions = {
        scrollbars: true,
        mouseWheel: true,
        hideScrollbars: false,
        fadeScrollbars: false,
        disableMouse: true,
        interactiveScrollbars: true
    };

They are passed in this way to the scrollOverflowOptions option:

scrollOverflowOptions: {
        scrollbars: true,
        mouseWheel: true,
        hideScrollbars: false,
        fadeScrollbars: false,
        disableMouse: true,
        interactiveScrollbars: true
    }

You would have to pass them in the same way. As an object of options in the scrollOverflowOptions option.

scrollOverflowOptions: {
     disableTouch: true
}

The default ones will be added by fullPage.js.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Andi-Stevenson picture Andi-Stevenson  路  4Comments

villain2 picture villain2  路  3Comments

piaomiao picture piaomiao  路  5Comments

Sperziemone picture Sperziemone  路  5Comments

mxnvkv picture mxnvkv  路  4Comments