alvarotrigo / alvarotrigo/fullPage.js
Request: Ability to Remove middle scroll button click functionality.
- 主要語言
- JavaScript
- 星號
- 35.4k
- 分支
- 7.1k
- PR 合併指標
- 30 天內沒有已合併 PR
描述
Is it possible to remove the middle scroll button click functionality by providing access to the function removeMiddleWheelHandler or provide an option to turn off the middle button click?
You can see the function I want to remove on fullpage.js by going to https://alvarotrigo.com/fullPage/ and clicking the middle scroll mouse button. The page moves to the next slide. It happens in all browsers. I want the option to remove this functionality.
Two Solutions are to either add removeMiddleWheelHandler to the public functions and let me call it from my page or to provide an option (middleMouseButton: true) to turn off the click and adding something like the following code to stop the event.
```
//binding the mousemove when the mouse's middle button is released
function mouseDownHandler(e){
if (options.middleMouseButton === false && e.button === 1) return false;
if (e.which == 2){
oldPageY = e.pageY;
container.addEventListener('mousemove', mouseMoveHandler);
}
}
//unbinding the mousemove when the mouse's middle button is released
function mouseUpHandler(e){
if (options.middleMouseButton === false && e.button === 1) return false;
if (e.which == 2){
container.removeEventListener('mousemove', mouseMoveHandler);
}
}
```
貢獻指南
評估
這個 Issue 還沒有評估資料。