diff --git a/app/assets/javascripts/app/pages/profile.js b/app/assets/javascripts/app/pages/profile.js index 93afc54f4..22f9c0056 100644 --- a/app/assets/javascripts/app/pages/profile.js +++ b/app/assets/javascripts/app/pages/profile.js @@ -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) diff --git a/app/assets/javascripts/app/views/canvas_view.js b/app/assets/javascripts/app/views/canvas_view.js index ad2681227..d5e004ee2 100644 --- a/app/assets/javascripts/app/views/canvas_view.js +++ b/app/assets/javascripts/app/views/canvas_view.js @@ -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(){