-
-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check if in view on resize events #45
check if in view on resize events #45
Conversation
var scrollable = this.get('scrollable'); | ||
if (Ember.typeOf(scrollable) === 'string') { | ||
var items = Ember.$(scrollable); | ||
_setupEvent(type) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick - but technically we're searching / setting up the bindable dom element for the event, rather than the event itself.
Maybe we should call this _setupBindable
or something instead?
1 comment - but also needs a master merge before I can merge. keen to cut a new release when this goes in! thanks for your great work @kellyselden ! |
No problem @hhff. I also merged Line 46 has got me thinking. Perhaps the |
I wonder if it would be better to leave out the resizable property and use the scrollable selector for the resizable logic, if in fact it doesn't make sense for them to be different. |
I agree @kellyselden - maybe lets call it bindable? (we'll also need to fallback to scrollable for backward compatibility) |
Would it be so bad to still call it scrollable and just hide the fact we are watching resize as well? or does that leave a bad taste? |
@kellyselden nah das cool with me! |
should be good now, feels a little cleaner |
check if in view on resize events
way way nicer @kellyselden - ur the man. |
gonna cut a release shortly |
@kellyselden 0.0.10 is up on NPM |
@hhff awesome. Thanks. |
No thankyou dude!!!
|
If you maximize a small window and the loader comes into view, it will looks like it hangs. This will watch the resize event and check if in view. Paired with #44, maximizing a window will load as many times as necessary to fill up the page.