diff options
author | Emmanuel ROHEE <erohee@amdocs.com> | 2014-08-20 17:04:32 +0200 |
---|---|---|
committer | Emmanuel ROHEE <erohee@amdocs.com> | 2014-08-20 17:04:50 +0200 |
commit | ba88c9105c0bd071c3cf044cd5d3aa4604c81e93 (patch) | |
tree | 809d536732421d08f23689dc7ce6ce23b93bd499 /webclient/room | |
parent | Send images with their imageInfo (size, mymetype, width & height) (diff) | |
download | synapse-ba88c9105c0bd071c3cf044cd5d3aa4604c81e93.tar.xz |
Create a placeholder for each image of the chat thread. The height of this placeholder is the height of the image so that the scroller position will not be disrupted when the image will be actually loaded and displayed in its full height
Diffstat (limited to '')
-rw-r--r-- | webclient/room/room.html | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/webclient/room/room.html b/webclient/room/room.html index e89bf670e3..4d7417a80e 100644 --- a/webclient/room/room.html +++ b/webclient/room/room.html @@ -41,7 +41,10 @@ <div class="bubble"> <span ng-hide='msg.content.msgtype !== "m.emote"' ng-bind-html="'* ' + (members[msg.user_id].displayname || msg.user_id) + ' ' + msg.content.body | linky:'_blank'"/> <span ng-hide='msg.content.msgtype !== "m.text"' ng-bind-html="((msg.content.msgtype === 'm.text') ? msg.content.body : '') | linky:'_blank'"/> - <img class="image" ng-hide='msg.content.msgtype !== "m.image"' ng-src="{{ msg.content.url }}"/> + <div ng-hide='msg.content.msgtype !== "m.image"' + ng-style="{ 'height' : (msg.content.body.h < 320) ? msg.content.body.h : 320}"> + <img class="image" ng-src="{{ msg.content.url }}"/> + </div> </div> </td> <td class="rightBlock"> |