Fix centering issue with sticker placeholder (#8404)
This commit is contained in:
parent
e3735311ab
commit
f85e178fc1
3 changed files with 20 additions and 5 deletions
|
@ -39,11 +39,19 @@ export default class MStickerBody extends MImageBody {
|
|||
return <div className="mx_MStickerBody_wrapper" onClick={onClick}> { children } </div>;
|
||||
}
|
||||
|
||||
// Placeholder to show in place of the sticker image if
|
||||
// img onLoad hasn't fired yet.
|
||||
// Placeholder to show in place of the sticker image if img onLoad hasn't fired yet.
|
||||
protected getPlaceholder(width: number, height: number): JSX.Element {
|
||||
if (this.props.mxEvent.getContent().info?.[BLURHASH_FIELD]) return super.getPlaceholder(width, height);
|
||||
return <img src={require("../../../../res/img/icons-show-stickers.svg").default} width="75" height="75" />;
|
||||
return (
|
||||
<img
|
||||
className="mx_MStickerBody_placeholder"
|
||||
src={require("../../../../res/img/icons-show-stickers.svg").default}
|
||||
width="80"
|
||||
height="80"
|
||||
onMouseEnter={this.onImageEnter}
|
||||
onMouseLeave={this.onImageLeave}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
// Tooltip to show on mouse over
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue