monospaced / hamster.js Goto Github PK
View Code? Open in Web Editor NEWA standalone javascript library for cross-browser mouse wheel support.
Home Page: http://monospaced.github.io/hamster.js
A standalone javascript library for cross-browser mouse wheel support.
Home Page: http://monospaced.github.io/hamster.js
Hello,
I added you to npm owner of hamsterjs packege.
Please remove me and update package.
Best regards, Darya Malysheva (ws.malysheva [ ] gmail.com)
Hi,
Thanks a lot for this package.
Can you provide a destroy function ?
I try with unwheel, but i thinks it's not enough
Thanks !
I am using hamster through angular-mousewheel v1.0.4
When listening for 'wheel' events I am getting back an event but the deltaX and deltaY values are NaN.
When you use the mousewheel on the example page, Safari 7.1 throws "TypeError: Attempted to assign to readonly property." on line 232.
What is the license for this libary? Thanks
const onWheel = (e, delta, deltaX, deltaY) => {}
const { body } = document
Hamster( body ).wheel( onWheel )
Hamster( body ).unwheel( onWheel )
throw an error
TypeError: undefined is not an object (evaluating 'handlers.normalised')
remove — hamster.js:153
offEvent — hamster.js:87
same is in #14
with navigators :
delatZ: 0
This appears to be an usused variable, but I am guessing it supposed to be deltaZ:
https://github.com/monospaced/hamster.js/blob/master/hamster.js#L211
Hello,
Currently main entry has the value "elastic". It should be hamster.js . It is not possible to require this module without this. (as commonjs / npm module)
There is a typo on your home page I thought you might like to be aware of.
No jQuery or other libraries required, but an adpater for AngularJS is available. Tested in these core browsers.
the latest version of chrome has added an extra scroll event to these devices that causes the scroll wheel callback to give NaN for delta, deltaX deltaY.
Mixing both mouse wheel and trackpad gives inconsistent results.
On the demo page, on rectangle #2:
Mac OS X, chrome 35
Hi,
I'm having a trouble when I try to get normalized values, especially for Chrome on Windows 7 :
• for mouse wheel up and down, on Chrome Mac, on your demo website, I get values between : 400, -400
• on Firefox (both Windows and Mac), inertia makes values sometimes go crazy : 5000, -5000 but I can handle it
• on Chrome Windows, it's really weird, with the same test as above, I get : 4, -4 max.
What can i do ?
Library was working fine using the delta. Upgraded to macOS and the scroll speed is outrageously fast now, and pretty much unusable.
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.