Merge branch 'bugfix/zoom' into develop

This commit is contained in:
gilson.manuel
2022-07-27 17:01:48 +01:00
4 changed files with 39 additions and 32 deletions
+17 -13
View File
@@ -14,28 +14,32 @@
</div>
</ion-header>
<ion-content fullscreen>
<div class="media d-flex align-items-center justify-center">
<div *ngIf="view" class="media d-flex align-items-center justify-center">
<div class="media-content w-100 d-flex align-items-center justify-center">
<ion-slides style="width: 100%; height: 100%;" [options]="sliderOpts">
<ion-slide>
<div class="swiper-zoom-container">
<div>
<div class="swiper-zoom-container" >
<div style="overflow: scroll; width: 100%; height:100%;">
<img src="{{image}}">
</div>
<!-- <div *ngIf="type == 'application/pdf'">
<iframe width="100%" height="100%" [src]="base64Sanitize" type="application/vnd.openxmlformats-officedocument.wordprocessingml.document"></iframe> -->
<!-- <pdf-viewer [src]="image"
[render-text]="true"
[original-size]="false"
style="width: 400px; height: 500px"
></pdf-viewer> -->
<!-- </div> -->
</div>
<div *ngIf="!view" class="swiper-zoom-container" >
<img src="{{image}}">
</div>
</ion-slide>
</ion-slides>
</div>
</div>
</ion-content>
<ion-slides *ngIf="!view" style="width: 100%; height: 100%;" [options]="sliderOpts">
<ion-slide>
<div class="swiper-zoom-container" >
<img src="{{image}}">
</div>
</ion-slide>
</ion-slides>
</ion-content>
+10 -7
View File
@@ -1,5 +1,5 @@
import { Component, OnInit } from '@angular/core';
import { ModalController, NavParams } from '@ionic/angular';
import { ModalController, NavParams, Platform } from '@ionic/angular';
import { DomSanitizer} from '@angular/platform-browser';
import { pdfDefaultOptions } from 'ngx-extended-pdf-viewer';
@@ -14,10 +14,10 @@ export class ViewMediaPage implements OnInit {
type: any;
name: string
_updatedAt: string
view: boolean
sliderOpts = {
zoom: true,
maxRation: 2
zoom: true
};
base64Sanitize:any = "";
@@ -26,6 +26,7 @@ export class ViewMediaPage implements OnInit {
private modalController: ModalController,
private navParams:NavParams,
public sanitizer: DomSanitizer,
private platform: Platform,
) {
this.image = this.navParams.get('image')
@@ -38,6 +39,12 @@ export class ViewMediaPage implements OnInit {
ngOnInit() {
this.base64Sanitize = this.sanitizer.bypassSecurityTrustResourceUrl(this.image);
if (this.platform.is('desktop')) {
this.view = true;
} else {
this.view = false;
}
}
@@ -60,10 +67,6 @@ export class ViewMediaPage implements OnInit {
const blob = new Blob(byteArrays, { type: contentType });
return blob;
};
close(){
this.modalController.dismiss()
+6 -6
View File
@@ -1,12 +1,12 @@
export const environment = {
//apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
//apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
//apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/',
//apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket',
apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
//apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
apiChatUrl: 'http://192.168.0.29:3000/api/v1/',
apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',
//apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
//apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
/* apiChatUrl: 'https://www.tabularium.pt/api/v1/',
apiWsChatUrl: 'wss://www.tabularium.pt/websocket', */
//apiChatUrl: 'https://www.tabularium.pt/api/v1/',
+6 -6
View File
@@ -22,12 +22,12 @@
export const environment = {
production: false,
//apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
//apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
//apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/',
//apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket',
apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
//apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
apiChatUrl: 'http://192.168.0.29:3000/api/v1/',
apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',
//apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
//apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
/* apiChatUrl: 'https://www.tabularium.pt/api/v1/',
apiWsChatUrl: 'wss://www.tabularium.pt/websocket', */
domain: 'gabinetedigital.local', //gabinetedigital.local