Zulko / eagle.js

A hackable slideshow framework built with Vue.js
https://zulko.github.io/eaglejs-demo/
ISC License
4.08k stars 221 forks source link

Throttle/debounce needed #6

Closed lkostrowski closed 6 years ago

lkostrowski commented 7 years ago

Just tested on chrome, mac os with Apple Magic Mouse. The scroll here is very sensitive and with one, 'normal' finger swiper i moved all slides. I needed to use keyboard to see anything from demos ;)

Zulko commented 7 years ago

Thanks for this. Not sure what to do as I've never seen magic mice before. Maybe a stopPropagation ?

Does it work if you just click on the left / right of the screen ?

lkostrowski commented 7 years ago

Click is ok. Just both magic mouse and macbook touchpad AFAIK generates very high amount of scroll events, so it should be throttled/debounced to simulate only one scroll event. You can use lodash for it.

Here is how it looks with one scroll gesture on mac.

https://cl.ly/0M2Y1I1Y0K0k/Screen%20Recording%202017-03-21%20at%2011.49%20AM.gif

vittorio commented 7 years ago

@Zulko i wrote a simple fix for this issue. What do i need to run to check it locally?

vittorio commented 7 years ago

@vorthess haha, correct. I meant which command should i run to build new version from sources?

lkostrowski commented 7 years ago

Sorry, deleted comment, didn't want to troll after all :D

Zulko commented 7 years ago

I may be the wrong guy I am pretty new to JS workflows. Right now you'd clone this repo, go to the example/boilerplate and type

npm install
npm run dev

Then you would go in the node_modules folder and create a symlink to the eagle.js code, which is the parent directory of example if you are using this repo:

npm link ../..

Now every change you make in the source code of eagle will be used by the example project.

Unless there is a better way to develop node packages ?

vittorio commented 7 years ago

@vorthess no problem :) @Zulko it's better if you'll describe this behaviour in readme or wiki. Better for future contributors :)

Zulko commented 7 years ago

I will, give me some time - this project is just a few days old !

In the meantime if anyone reading this has better suggestions for how to develop npm packages let me know.

yaodingyd commented 6 years ago

Fixed with bd14f5b83c4713c7da1936912e5dfade5339cec9 and 0d771b385539b55c3f0dd27ed5dbe90a9379d65c