Skip to content

Commit

Permalink
Make sure the Place is loaded before adding the located CSS class.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericf committed Oct 26, 2011
1 parent fbcf972 commit a0eeca5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/js/photosnearme.js
Expand Up @@ -20,7 +20,6 @@ Y.PhotosNearMe = Y.Base.create('photosNearMe', Y.App, [], {
initializer: function () {
this.after('placeChange', this.render);
this.after('placeChange', this.loadPhotos);

this.on('gridView:more', this.loadMorePhotos);

// Do initial dispatch.
Expand Down Expand Up @@ -53,7 +52,8 @@ Y.PhotosNearMe = Y.Base.create('photosNearMe', Y.App, [], {
});

container.removeClass('loading').one('#header').setContent(content);
Y.later(1, container, 'addClass', 'located');
// Delay adding `located` class so the CSS transitions run.
!place.isNew() && Y.later(1, container, 'addClass', 'located');

return this;
},
Expand Down

0 comments on commit a0eeca5

Please sign in to comment.