Coder Social home page Coder Social logo

Comments (4)

hhff avatar hhff commented on June 19, 2024

Hi @temo44 !

Thanks for this! Check this link. It explains why we're using the infinity-loader's guid for the event namespace. It's standard jQuery practise to use . to namespace an event. Seeing as a developer will probably be binding other scroll events to the window, we want to be sure to only remove this particular one when the infinity-scroller is destroyed. Make sense?

Also - check out the latest release (just released this morning) #4 - it now has a "scrollable" attribute that can be used to pass in a selector string 😄

from ember-infinity.

timohermans avatar timohermans commented on June 19, 2024

Thank you for the reply @hhff !

It makes total sense. However, won't the selector still be incorrect, as Ember generates infinity-loader's guid as an ID, and not a class?

Cool that the feature is introduced 😄.

Awesome addon btw!

from ember-infinity.

hhff avatar hhff commented on June 19, 2024

Thanks @temo44 !

The guid is only used as the event namespace - ie: the unique string that "scrollable" (usually the window) uses to identify the event name. It's not a selector - it's a scroll event with a unique namespace.

it could be

Ember.$(scrollElement).on("scroll."+Math.random(), function() {

But a GUID is guaranteed to be unique. make sense?

from ember-infinity.

timohermans avatar timohermans commented on June 19, 2024

Aaah thanks! It totally makes sense now.

I know where my thought process went wrong 😄 ! I still thought it was part of the 'not-scrolling' problem(hence, the idea that it's a selector instead of a namespace), because I have a different scrolling element. Thank you so much!

from ember-infinity.

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.