actually use the computed image height; remove unused presenter
This commit is contained in:
parent
ff42f250ca
commit
0960a090fa
4 changed files with 5 additions and 8 deletions
|
|
@ -26,6 +26,7 @@ app.views.CanvasFrame = app.views.SmallFrame.extend({
|
|||
},
|
||||
|
||||
presenter : function(){
|
||||
console.log(this.adjustedImageHeight())
|
||||
return _.extend(this.smallFramePresenter(), {
|
||||
adjustedImageHeight : this.adjustedImageHeight()
|
||||
})
|
||||
|
|
|
|||
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue