mudin / magic-scroll Goto Github PK
View Code? Open in Web Editor NEWApple Magic Mouse scrolling effect for normal mouses
Home Page: https://mudin.github.io/magic-scroll/
License: MIT License
Apple Magic Mouse scrolling effect for normal mouses
Home Page: https://mudin.github.io/magic-scroll/
License: MIT License
Hi and thx a lot for this work :)
I'm using it in my Gatsby website and it works like magic !
Sometimes I have to perform a smooth goto on my web page with this method
window.scroll({ top: elemPos + offSet, left: 0, behavior: 'smooth' });
And when I take back the control with my mouse, scroll position go back to last scroll position before my goto.
Do you know how to keep my scroll position ?
Thx
Is there a way I can add easing to the code?
Is it worth using this instead of the basic function used here?
https://github.com/basilfx/normalize-wheel/tree/master/src
I try to make it work for main scroll of the body. So I pass "body" string to the document query selector. But it do not work. Scrolling isn't smooth. Is there any way to make it work? Or any ideas to make smooth scroll on user action (wheel, keyboard, touchpad)?
Thanks!
Here is an example of my object init:
let magicScroll = new MagicScroll({
target: document.querySelector("body"),
speed: 160,
smooth: 24
});
An ability to exempt scroll effect from working in certain apps, like when 3D modeling one might want default behavior from scroll wheel, so it can be customize. For example when using Blender I have to zoom in and out scenes when using scroll wheel, but this app will force to scroll instead in 3D space. Not sure if it's possible to add this "black listing" feature?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.