From 88a17474f78f90e9fc0d60371b3dab6e883829ea Mon Sep 17 00:00:00 2001 From: Dennis Collinson Date: Mon, 23 Apr 2012 16:52:09 -0700 Subject: [PATCH] MS DC kill dead code in small Frame --- .../javascripts/app/views/small_frame.js | 22 ------------------- .../stylesheets/new_styles/_canvas.scss | 4 ---- 2 files changed, 26 deletions(-) diff --git a/app/assets/javascripts/app/views/small_frame.js b/app/assets/javascripts/app/views/small_frame.js index 2d973c566..76f0ad99c 100644 --- a/app/assets/javascripts/app/views/small_frame.js +++ b/app/assets/javascripts/app/views/small_frame.js @@ -41,33 +41,11 @@ app.views.SmallFrame = app.views.Base.extend({ /* by default, make it big if it's a fav */ if(this.model.get("favorite")) { return "x2 width height" } - var firstPhoto = this.model.get("photos")[0] - , className = "photo "; - - if(!firstPhoto || - (firstPhoto && !firstPhoto.dimensions.height || !firstPhoto.dimensions.width)) { return "" } - if(this.model.get("o_embed_cache")) { return("x2 width") } return '' - return(className + ratio(firstPhoto.dimensions)) - function ratio(dimensions) { - var ratio = (dimensions.width / dimensions.height) - - if(ratio > 1.5) { - return "x2 width" - } else if(ratio < 0.75) { - return "x2 height" - } else { - if(ratio > 1) { - return "scale-vertical" - } else { - return "scale-horizontal" - } - } - } }, favoritePost : function(evt) { diff --git a/app/assets/stylesheets/new_styles/_canvas.scss b/app/assets/stylesheets/new_styles/_canvas.scss index 538b668fd..47a02de0c 100644 --- a/app/assets/stylesheets/new_styles/_canvas.scss +++ b/app/assets/stylesheets/new_styles/_canvas.scss @@ -188,8 +188,4 @@ body { &.x2.width .content { @include wide(); } &.sticky-note.x2.height .content { @include tall(); } - &.scale-horizontal .content img, - &.scale-horizontal .content .image-container {width : 100%; } - - }