element-web/src/components/views
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
..
avatars tell eslint to ignore viewAvatarOnClick being unused 2018-05-06 00:22:14 +01:00
context_menus improve wording 2018-04-27 11:26:42 +01:00
create_room Remove use of deprecated React.PropTypes 2017-12-26 14:03:18 +13:00
dialogs allow CreateRoom to scale properly horizontally 2018-06-13 09:13:32 +01:00
directory point imports at the new locations 2018-04-13 00:43:44 +01:00
elements Merge pull request #1943 from akihikodaki/react 2018-06-06 10:08:52 +01:00
globals Update cookie bar wording 2018-05-24 16:58:14 +01:00
groups add mx_filterFlipColor to mx_MemberInfo_cancel img 2018-06-12 15:35:06 +01:00
login fix paths and updateCheckStatusEnum 2018-04-13 16:49:59 +01:00
messages Handle images without width/height info correctly 2018-06-14 15:44:55 +01:00
room_settings guard against m.room.aliases events with no keys (redaction?) 2018-02-02 08:12:56 +00:00
rooms Revert "Fix exception when opening dev tools" 2018-06-14 10:52:39 +01:00
settings point imports at the new locations 2018-04-13 00:43:44 +01:00
voip missing semicolon 2018-02-07 11:51:41 +00:00