From a0eeca59ddb15582cce37692e1aea1abd867bde2 Mon Sep 17 00:00:00 2001 From: Eric Ferraiuolo Date: Wed, 26 Oct 2011 13:22:51 -0400 Subject: [PATCH] Make sure the Place is loaded before adding the `located` CSS class. --- public/js/photosnearme.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/js/photosnearme.js b/public/js/photosnearme.js index d012973..733e483 100644 --- a/public/js/photosnearme.js +++ b/public/js/photosnearme.js @@ -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. @@ -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; },