This commit is contained in:
tiago.kayaya
2021-12-06 16:00:57 +01:00
parent dda0d1c88f
commit 1c9b3ba36a
5 changed files with 85 additions and 27 deletions
+16 -9
View File
@@ -246,7 +246,12 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
}
viewDocument(file:any, url?:string){
if(file.type == "application/webtrix") {
if(file.type == "application/img"){
console.log(file);
//this.fileService.getFile().toPromise();
}
else if(file.type == "application/webtrix") {
this.openViewDocumentModal(file);
}
else{
@@ -428,8 +433,10 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
this.fileService.addCameraPictureToChat(roomId);
}
addImage(){
const roomId = this.roomId
const roomId = this.roomId;
this.fileService.addPictureToChat(roomId);
//this.fileService.loadPicture();
//this.fileService.addPictureToChat(roomId);
}
addFile(){
this.fileService.addDocumentToChat(this.roomId);
@@ -563,7 +570,7 @@ export class MessagesPage implements OnInit, OnChanges, AfterViewInit, OnDestroy
};
zoomActive = false;
zoomScale = 1;
sliderZoomOpts = {
allowSlidePrev: false,
allowSlideNext: false,
@@ -571,27 +578,27 @@ sliderZoomOpts = {
maxRatio: 5
},
on: {
zoomChange: (scale, imageEl, slideEl) => {
zoomChange: (scale, imageEl, slideEl) => {
this.zoomActive = true;
this.zoomScale = scale/5;
this.changeDetectorRef.detectChanges();
this.changeDetectorRef.detectChanges();
}
}
}
async touchEnd(zoomslides: IonSlides, card) {
// Zoom back to normal
const slider = await zoomslides.getSwiper();
const zoom = slider.zoom;
zoom.out();
// Card back to normal
card.el.style['z-index'] = 9;
this.zoomActive = false;
this.changeDetectorRef.detectChanges();
}
touchStart(card) {
// Make card appear above backdrop
card.el.style['z-index'] = 11;