fix bubble being too wide on mobile

This commit is contained in:
or-else
2021-05-02 09:48:07 -07:00
parent 4a480d71cc
commit 430b2db9aa
7 changed files with 8 additions and 6 deletions
+1 -1
View File
@@ -189,7 +189,7 @@ function draftyFormatter(style, data, values, key) {
if (data) {
attr.className = 'inline-image';
const dim = fitImageSize(data.width, data.height,
Math.min(this.props.viewportWidth - REM_SIZE * 4, REM_SIZE * 34.5), REM_SIZE * 24, false) ||
Math.min(this.props.viewportWidth - REM_SIZE * 6.5, REM_SIZE * 34.5), REM_SIZE * 24, false) ||
{dstWidth: BROKEN_IMAGE_SIZE, dstHeight: BROKEN_IMAGE_SIZE};
attr.style = {
width: dim.dstWidth + 'px',