peopleconnectus / ember-concurrency-scroll

An Ember addon that provides a scrolling service that uses ember-concurrency to animate and manage window and element scrolling

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Configurable ember-concurrency modifier

joshuabaran opened this issue · comments

I'd like the ability to use drop or enqueue instead of the keepLatest ember-concurrency modifier.

Specifically, I'd like to be able to configure the service to drop scroll tasks when it's already scrolling. I don't have any specific use of enqueue in mind, but think it could be handy.

After some consideration, I believe this is best handled inside the implementing application. Because we are using keepLatest by default, you can still use enqueue or drop in your implemented task in your app, but you need to manage them all from the same task queue.

So putting them on a instanced component won't work, since each instance doesn't share the same task queue. You'd need to pass the task from a parent component or controller in a closure action, then all of the tasks would share the same queue and could be dropped or enqueued.

Hopefully that makes sense.