GithubHelp home page GithubHelp logo

Comments (9)

ryanmclaughlin avatar ryanmclaughlin commented on September 3, 2024

I'm experiencing this as well.

from angular-inview.

4storia avatar 4storia commented on September 3, 2024

Line 256 of the source has
return timer = setTimeout(f, t != null ? t : 100);
If you need the scroll event to fire more frequently, lower the 100 to something smaller, ie
return timer = setTimeout(f, t != null ? t : 40);

from angular-inview.

thenikso avatar thenikso commented on September 3, 2024

would you think parametrizing that debounce timer would make sense? possibly setting it at 0 to remove the debounce entirely.

What would a good way of parametrizing it look like to you? Would a provider be too much? maybe a constant would suffice. opinions?

from angular-inview.

arthur-white avatar arthur-white commented on September 3, 2024

On second thought,
as soon as the scrolling begins /* Turn on polling every n miliseconds /
When the scrolling stops /
Do a debounced stop polling call */

from angular-inview.

Martinsos avatar Martinsos commented on September 3, 2024

Is javascript executing while scrolling is happening?

from angular-inview.

thenikso avatar thenikso commented on September 3, 2024

there is no polling, only debouncing of scroll events to 100ms. Javascript is always executing when scrolling (now also on iOS8).

from angular-inview.

urecio avatar urecio commented on September 3, 2024

Hi, I think this could be better if we can configure it.
I have created a pull request
#35

from angular-inview.

thenikso avatar thenikso commented on September 3, 2024

I was planning to introduce another breaking change (I like those) by deprecating in-view-offset and add in-view-options (much like the new ng-model-options) which may work like:

<any in-view="$inview&&someFunction()" in-view-options="{ offsetTop:100, offsetBottom:0, debounce:100 }"></any>

The default debounce value may be 0 (meaning no debounce at all).

from angular-inview.

thenikso avatar thenikso commented on September 3, 2024

With the PR #36 now published as version 1.5.0 this should be fixed. Tests are appreciated!

from angular-inview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.