spell height correctly

This commit is contained in:
Bruno Windels 2020-05-09 21:21:55 +02:00
parent 8ff6e08006
commit 2b17d0f691
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ export class ImageTile extends MessageTile {
get thumbnailUrl() { get thumbnailUrl() {
const mxcUrl = this._getContent().url; const mxcUrl = this._getContent().url;
return this._room.mxcUrlThumbnail(mxcUrl, this.thumbnailWidth, this.thumbnailHeigth, "scale"); return this._room.mxcUrlThumbnail(mxcUrl, this.thumbnailWidth, this.thumbnailHeight, "scale");
} }
get url() { get url() {
@ -33,7 +33,7 @@ export class ImageTile extends MessageTile {
return Math.round(info.w * this._scaleFactor()); return Math.round(info.w * this._scaleFactor());
} }
get thumbnailHeigth() { get thumbnailHeight() {
const {info} = this._getContent(); const {info} = this._getContent();
return Math.round(info.h * this._scaleFactor()); return Math.round(info.h * this._scaleFactor());
} }

View File

@ -7,7 +7,7 @@ export class ImageView extends TemplateView {
t.div({className: "message-container"}, [ t.div({className: "message-container"}, [
t.div({className: "sender"}, vm => vm.isContinuation ? "" : vm.sender), t.div({className: "sender"}, vm => vm.isContinuation ? "" : vm.sender),
t.div(t.a({href: vm.url, target: "_blank"}, t.div(t.a({href: vm.url, target: "_blank"},
t.img({src: vm.thumbnailUrl, width: vm.thumbnailWidth, heigth: vm.thumbnailHeigth, loading: "lazy", alt: vm.label}))), t.img({src: vm.thumbnailUrl, width: vm.thumbnailWidth, height: vm.thumbnailHeight, loading: "lazy", alt: vm.label}))),
t.p(t.time(vm.date + " " + vm.time)), t.p(t.time(vm.date + " " + vm.time)),
]) ])
); );