eagerly call isotope before images are loaded; optimistically assume wallpaper is in the cache until we actually fix the issue [ci skip]
This commit is contained in:
parent
62829aee85
commit
b641cddb65
2 changed files with 15 additions and 4 deletions
|
|
@ -27,7 +27,9 @@ app.pages.Profile = app.views.Base.extend({
|
|||
this.model = this.model || app.models.Profile.preloadOrFetch(this.personGUID)
|
||||
this.stream = options && options.stream || new app.models.Stream()
|
||||
|
||||
this.model.bind("change", this.setPageTitleAndBackground, this)
|
||||
/* this needs to be fixed... used to be bound by this.model change event.
|
||||
* will most likely result in spontaneous results :( */
|
||||
this.setPageTitleAndBackground()
|
||||
|
||||
/* binds for getting started pulsation */
|
||||
this.stream.bind("fetched", this.pulsateNewPostControl, this)
|
||||
|
|
|
|||
|
|
@ -38,8 +38,17 @@ app.views.Canvas = app.views.Base.extend(_.extend({}, app.views.infiniteScrollMi
|
|||
|
||||
mason : function() {
|
||||
var el = this.$el;
|
||||
el.imagesLoaded(function(){
|
||||
el.isotope({
|
||||
|
||||
/* make two calls to isotope
|
||||
1) on dom ready
|
||||
2) on images ready
|
||||
*/
|
||||
triggerIsotope(el) && el.imagesLoaded(function(){
|
||||
triggerIsotope(el)
|
||||
})
|
||||
|
||||
function triggerIsotope(element) {
|
||||
return element.isotope({
|
||||
itemSelector : '.canvas-frame',
|
||||
visibleStyle : {scale : 1},
|
||||
hiddenStyle : {scale : 0.001},
|
||||
|
|
@ -48,7 +57,7 @@ app.views.Canvas = app.views.Base.extend(_.extend({}, app.views.infiniteScrollMi
|
|||
columnWidth : 292.5
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
triggerRelayoutAfterImagesLoaded : function(){
|
||||
|
|
|
|||
Loading…
Reference in a new issue