element-web/src/components/views/messages
Luke Barnard 2d14d51ecb Handle images without width/height info correctly
Prior to #1912, height fix up of image events without an `info` in their
content would fail, setting `style.height = null + "px"`.

Now that all thumbnail sizing is done through one path, we can fix the
same problem for all cases (images, stickers, e2e/non-e2e) by handling
images without `info` correctly.

At the bare minimum, we use a null-guard that will make sure an image
without an `info` does not appear in the timeline (as a spinner or
otherwise until loaded). When loaded, we size it like any other image
by using the natural dimensions of the loaded image in place of `info`.

Note that we do not apply the same logic to images that *do* specify an
`info` with `w` and `h` keys. If the aspect ratio of the image does not
match that of the event, we use the one in `info` even when the image
has loaded.
2018-06-14 15:44:55 +01:00
..
DateSeparator.js point imports at the new locations 2018-04-13 00:43:44 +01:00
MAudioBody.js revokeObjectURLs 2018-04-29 03:17:55 +01:00
MessageEvent.js make more generic 2018-06-13 09:32:21 +01:00
MessageTimestamp.js point imports at the new locations 2018-04-13 00:43:44 +01:00
MFileBody.js fix regressions introduced by 00b7cc512b 2018-04-29 04:41:30 +01:00
MImageBody.js Handle images without width/height info correctly 2018-06-14 15:44:55 +01:00
MStickerBody.js Factor out all shared logic between MStickerBody and MImageBody 2018-05-21 16:59:13 +01:00
MVideoBody.js Fix MVideoBody spinner 2018-05-22 17:13:45 +01:00
RoomAvatarEvent.js Remove use of deprecated React.PropTypes 2017-12-26 14:03:18 +13:00
SenderProfile.js Only calculate displayed groups if flair enabled 2017-11-28 15:49:11 +00:00
TextualBody.js Fix ContextualMenu imports for TagTile and code block copy button 2018-05-14 17:36:57 +01:00
TextualEvent.js Remove use of deprecated React.PropTypes 2017-12-26 14:03:18 +13:00
UnknownBody.js Handle redaction with no sender 2017-10-25 17:37:20 +01:00