Fix emoji animation's position on changing chat

This commit is contained in:
Eduard Kuzmenko 2022-01-24 04:03:02 +04:00
parent f9fce9116b
commit 02359d71d6

View File

@ -1399,6 +1399,10 @@ export function wrapSticker({doc, div, middleware, lazyLoadQueue, group, play, o
const randomOffsetY = generateRandomSigned(4);
const stableOffsetX = size / 8 * (isOut ? 1 : -1);
const setPosition = () => {
if(!isInDOM(div)) {
return;
}
const rect = div.getBoundingClientRect();
/* const boxWidth = Math.max(rect.width, rect.height);
const boxHeight = Math.max(rect.width, rect.height);