Commit 67d27f8de45752beb1e98714f05abb5062bb19d5

Authored by OpenWapp Developer
1 parent 3e6018b829

Removing cropImage as it is unnecessary

Showing 2 changed files with 1 additions and 34 deletions

app/scripts/views/multimedia-message.js View file @ 67d27f8
... ... @@ -43,39 +43,6 @@
43 43 this.setElement(newElement);
44 44  
45 45 var img = this.$el.find('aside img');
46   - img.css('visibility', 'hidden');
47   -
48   - var _this = this;
49   - img.on('load', function () {
50   - _this._cropImage();
51   - img.css('visibility', 'visible');
52   - });
53   - },
54   -
55   - _cropImage: function () {
56   - var containerWidth = this.$el.find('aside a').width();
57   - var containerHeight = this.$el.find('aside a').height();
58   - var img = this.$el.find('aside img');
59   -
60   - var thumbWidth = containerWidth;
61   - var thumbHeight = containerHeight;
62   - var ratio = img.width() / img.height();
63   - if (ratio >= 1) { // landscape
64   - thumbWidth = thumbHeight * ratio;
65   - }
66   - else { // portrait
67   - thumbHeight = thumbWidth / ratio;
68   - }
69   -
70   - img.width(thumbWidth);
71   - img.height(thumbHeight);
72   - img.css({
73   - 'position': 'absolute',
74   - 'top': '50%',
75   - 'left': '50%',
76   - 'margin-left': -thumbWidth / 2 + 'px',
77   - 'margin-top': -thumbHeight / 2 + 'px'
78   - });
79 46 },
80 47  
81 48 _requestResend: function () {
app/styles/_conversation.sass View file @ 67d27f8
... ... @@ -189,7 +189,7 @@
189 189 &.image
190 190 span.content
191 191 padding-right: 7.7rem // 2.7 + 5 rem
192   - min-height: 5.4rem // 5 + 0.4 rem
  192 + min-height: 7.4rem // 7 + 0.4 rem
193 193 aside
194 194 overflow: hidden
195 195 aside a