diff --git a/app/js/controllers.js b/app/js/controllers.js index 77b042a5..2a58d9c2 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -4790,12 +4790,15 @@ angular.module('myApp.controllers', ['myApp.i18n']) $scope.documents = result.documents; $scope.stickerEmojis = {}; + $scope.stickerDimensions = {}; angular.forEach($scope.documents, function (doc) { $scope.stickerEmojis[doc.id] = RichTextProcessor.wrapRichText(doc.stickerEmojiRaw, { noLinks: true, noLinebreaks: true, emojiIconSize: 26 }); + var dim = calcImageInBox(doc.w, doc.h, 192, 192); + $scope.stickerDimensions[doc.id] = {width: dim.w, height: dim.h}; }); }); diff --git a/app/js/directives.js b/app/js/directives.js index a7321a47..d8dce3eb 100755 --- a/app/js/directives.js +++ b/app/js/directives.js @@ -2107,6 +2107,8 @@ angular.module('myApp.directives', ['myApp.filters']) imgElement.attr('alt', '['+ ($scope.document.stickerEmojiRaw || '') + ' ' + _('conversation_media_sticker') +']'); + var dim = attrs.dim && $scope.$parent.$eval(attrs.dim) || $scope.document.thumb; + if (attrs.open && $scope.document.stickerSetInput) { element .addClass('clickable') @@ -2124,12 +2126,12 @@ angular.module('myApp.directives', ['myApp.filters']) }; imgElement.css({ - width: $scope.document.thumb.width, - height: $scope.document.thumb.height + width: dim.width, + height: dim.height }); element.css({ - width: $scope.document.thumb.width, - height: $scope.document.thumb.height + width: dim.width, + height: dim.height }); var smallLocation = false; diff --git a/app/partials/desktop/message.html b/app/partials/desktop/message.html index 753aa3fc..74113f94 100644 --- a/app/partials/desktop/message.html +++ b/app/partials/desktop/message.html @@ -45,7 +45,7 @@
- []  : + []  : diff --git a/app/partials/desktop/stickerset_modal.html b/app/partials/desktop/stickerset_modal.html index 855be1e1..bc8b062c 100644 --- a/app/partials/desktop/stickerset_modal.html +++ b/app/partials/desktop/stickerset_modal.html @@ -27,7 +27,7 @@
-
+