Browse Source

returned back raf for photos

master
morethanwords 4 years ago
parent
commit
1de9861f30
  1. 5
      src/components/wrappers.ts

5
src/components/wrappers.ts

@ -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…
Cancel
Save