|
|
@ -301,9 +301,13 @@ export function wrapVideo(this: any, doc: MTDocument, container: HTMLDivElement, |
|
|
|
/* image.style.height = doc.h + 'px'; |
|
|
|
/* image.style.height = doc.h + 'px'; |
|
|
|
image.style.width = doc.w + 'px'; */ |
|
|
|
image.style.width = doc.w + 'px'; */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!justLoader) { |
|
|
|
if(!justLoader) { |
|
|
|
return loadVideo(); |
|
|
|
return loadVideo(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
|
|
|
|
container.style.width = ''; |
|
|
|
|
|
|
|
container.style.height = ''; |
|
|
|
preloader.detach(); |
|
|
|
preloader.detach(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -532,6 +536,7 @@ export function wrapPhoto(this: AppImManager, photo: any, message: any, containe |
|
|
|
|
|
|
|
|
|
|
|
let size = appPhotosManager.setAttachmentSize(photo.id, container); |
|
|
|
let size = appPhotosManager.setAttachmentSize(photo.id, container); |
|
|
|
let image = container.firstElementChild as HTMLImageElement || new Image(); |
|
|
|
let image = container.firstElementChild as HTMLImageElement || new Image(); |
|
|
|
|
|
|
|
//let size = appPhotosManager.setAttachmentSize(photo.id, image);
|
|
|
|
image.setAttribute('message-id', message.mid); |
|
|
|
image.setAttribute('message-id', message.mid); |
|
|
|
|
|
|
|
|
|
|
|
if(!container.contains(image)) { |
|
|
|
if(!container.contains(image)) { |
|
|
@ -549,6 +554,11 @@ export function wrapPhoto(this: AppImManager, photo: any, message: any, containe |
|
|
|
image.src = URL.createObjectURL(blob); |
|
|
|
image.src = URL.createObjectURL(blob); |
|
|
|
|
|
|
|
|
|
|
|
preloader.detach(); |
|
|
|
preloader.detach(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
image.style.width = ''; |
|
|
|
|
|
|
|
image.style.height = ''; |
|
|
|
|
|
|
|
container.style.width = ''; |
|
|
|
|
|
|
|
container.style.height = ''; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
console.log('wrapPhoto', load, container, image); |
|
|
|
console.log('wrapPhoto', load, container, image); |
|
|
|