mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 10:15:43 +03:00
Fix code to be equivalent to the previous one
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
parent
27f74b3ebd
commit
1a2476609c
1 changed files with 13 additions and 10 deletions
|
@ -24,16 +24,19 @@ function remoteRender(event: MessageEvent): void {
|
||||||
|
|
||||||
// Apply image style after so we can steal the anchor's colour.
|
// Apply image style after so we can steal the anchor's colour.
|
||||||
// Style copied from a rendered version of mx_MFileBody_download_icon
|
// Style copied from a rendered version of mx_MFileBody_download_icon
|
||||||
// @ts-ignore
|
if (data.imgStyle) {
|
||||||
img.style = data.imgStyle ?? "";
|
// @ts-ignore
|
||||||
img.style.width = "12px";
|
img.style = data.imgStyle;
|
||||||
img.style.height = "12px";
|
} else {
|
||||||
img.style.webkitMaskSize = "12px";
|
img.style.width = "12px";
|
||||||
img.style.webkitMaskPosition = "center";
|
img.style.height = "12px";
|
||||||
img.style.webkitMaskRepeat = "no-repeat";
|
img.style.webkitMaskSize = "12px";
|
||||||
img.style.display = "inline-block";
|
img.style.webkitMaskPosition = "center";
|
||||||
img.style.webkitMaskImage = `url('${data.imgSrc}')`;
|
img.style.webkitMaskRepeat = "no-repeat";
|
||||||
img.style.backgroundColor = `${a.style.color}`;
|
img.style.display = "inline-block";
|
||||||
|
img.style.webkitMaskImage = `url('${data.imgSrc}')`;
|
||||||
|
img.style.backgroundColor = `${a.style.color}`;
|
||||||
|
}
|
||||||
|
|
||||||
const body = document.body;
|
const body = document.body;
|
||||||
// Don't display scrollbars if the link takes more than one line to display.
|
// Don't display scrollbars if the link takes more than one line to display.
|
||||||
|
|
Loading…
Reference in a new issue