returned back raf for photos
This commit is contained in:
parent
d15e5e8f74
commit
1de9861f30
@ -37,6 +37,7 @@ import { onVideoLoad } from '../helpers/files';
|
|||||||
import { animateSingle } from '../helpers/animation';
|
import { animateSingle } from '../helpers/animation';
|
||||||
import renderImageFromUrl from '../helpers/dom/renderImageFromUrl';
|
import renderImageFromUrl from '../helpers/dom/renderImageFromUrl';
|
||||||
import sequentialDom from '../helpers/sequentialDom';
|
import sequentialDom from '../helpers/sequentialDom';
|
||||||
|
import { fastRaf } from '../helpers/schedulers';
|
||||||
|
|
||||||
const MAX_VIDEO_AUTOPLAY_SIZE = 50 * 1024 * 1024; // 50 MB
|
const MAX_VIDEO_AUTOPLAY_SIZE = 50 * 1024 * 1024; // 50 MB
|
||||||
|
|
||||||
@ -730,7 +731,9 @@ export function wrapPhoto({photo, message, container, boxWidth, boxHeight, withT
|
|||||||
sequentialDom.mutateElement(container, () => {
|
sequentialDom.mutateElement(container, () => {
|
||||||
container.append(image);
|
container.append(image);
|
||||||
|
|
||||||
resolve();
|
fastRaf(() => {
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
|
||||||
if(needFadeIn) {
|
if(needFadeIn) {
|
||||||
image.addEventListener('animationend', () => {
|
image.addEventListener('animationend', () => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user