actually use the computed image height; remove unused presenter

This commit is contained in:
danielgrippi 2012-05-21 11:09:33 -07:00
parent ff42f250ca
commit 0960a090fa
4 changed files with 5 additions and 8 deletions

View file

@ -26,6 +26,7 @@ app.views.CanvasFrame = app.views.SmallFrame.extend({
},
presenter : function(){
console.log(this.adjustedImageHeight())
return _.extend(this.smallFramePresenter(), {
adjustedImageHeight : this.adjustedImageHeight()
})

View file

@ -39,9 +39,9 @@ app.views.Canvas = app.views.Base.extend(_.extend({}, app.views.infiniteScrollMi
1) on dom ready
2) on images ready
*/
triggerIsotope(el) && el.imagesLoaded(function(){
triggerIsotope(el)
})
triggerIsotope(el) && el.imagesLoaded(_.bind(function(){
this.reLayout()
},this))
function triggerIsotope(element) {
return element.isotope({

View file

@ -19,10 +19,6 @@ app.views.SmallFrame = app.views.Post.extend({
return new app.views.OEmbed({model : this.model})
},
presenter : function(){
return this.smallFramePresenter()
},
smallFramePresenter : function(){
//todo : we need to have something better for small frame text, probably using the headline() scenario.
return _.extend(this.defaultPresenter(),

View file

@ -2,7 +2,7 @@
{{#if photos}}
<div class="image-container">
{{#each photos}}
<img src="{{sizes.large}}" {{#if ../adjustedImageHeight}}style="height:{{../adjustedImageHeight}}px;"{{/if}} />
<img src="{{sizes.large}}" {{#if ../../adjustedImageHeight}}style="height:{{../../adjustedImageHeight}}px;"{{/if}} />
{{/each}}
</div>
{{/if}}