logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://anongit.hacktivis.me/git/pleroma-fe.git/
commit: 1ff3be579c49dce7f5a94c9d9ffe28cca0bf1b96
parent 9c10370e1960f4adaa5f2d2ffd9f41b418f5d92a
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date:   Sat, 28 Dec 2024 14:44:21 +0000

Merge branch 'emoji-fixes' into 'develop'

fix default values for emoji size calculations

See merge request pleroma/pleroma-fe!1960

Diffstat:

Msrc/components/emoji_picker/emoji_picker.js10++++------
1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js @@ -143,11 +143,11 @@ const EmojiPicker = { const fontSize = css.getPropertyValue('font-size') const emojiSize = css.getPropertyValue('--emojiSize') - const fontSizeUnit = fontSize.replace(/[0-9,.]+/, '') - const fontSizeValue = Number(fontSize.replace(/[^0-9,.]+/, '')) + const fontSizeUnit = fontSize.replace(/[0-9,.]+/, '') || 'px' + const fontSizeValue = Number(fontSize.replace(/[^0-9,.]+/, '')) || 14 - const emojiSizeUnit = emojiSize.replace(/[0-9,.]+/, '') - const emojiSizeValue = Number(emojiSize.replace(/[^0-9,.]+/, '')) + const emojiSizeUnit = emojiSize.replace(/[0-9,.]+/, '') || 'rem' + const emojiSizeValue = Number(emojiSize.replace(/[^0-9,.]+/, '')) || 2.2 let fontSizeMultiplier if (fontSizeUnit.endsWith('em')) { @@ -155,8 +155,6 @@ const EmojiPicker = { } else { fontSizeMultiplier = fontSizeValue / 14 } - console.log('Multiplier', fontSizeMultiplier) - console.log('Result', fontSizeMultiplier * 14) let emojiSizeReal if (emojiSizeUnit.endsWith('em')) {