gabinete digital automatic adjast height

This commit is contained in:
Peter Maquiran
2021-03-04 16:40:06 +01:00
parent 6e2c2b8bd6
commit e8bef5dcc0
3 changed files with 50 additions and 2 deletions
@@ -35,7 +35,6 @@ export class GabineteDigitalPage implements OnInit {
constructor(
private processesbackend:ProcessesService,
private modalController: ModalController,
private eventService: EventsService,
private alertService: AlertService) {
window.onresize = (event) => {
@@ -43,10 +42,32 @@ export class GabineteDigitalPage implements OnInit {
if( window.innerWidth <= 1024){
this.modalController.dismiss();
}
this.adjastModalHeight();
};
this.adjastModalHeight();
}
adjastModalHeight(){
setTimeout(() => {
if( window.innerWidth <= 1366){
document.querySelectorAll('.gabinete-digital-mobile-modal-to-Desktop').forEach(e=>{
console.log('adjast width')
e.setAttribute('style',`height:${window.innerHeight - (74 + 57)}px`)
})
} else if( window.innerWidth >= 1366){
document.querySelectorAll('.gabinete-digital-mobile-modal-to-Desktop').forEach(e=>{
console.log('adjast width')
e.setAttribute('style',`height:${window.innerHeight - (74)}px`)
})
}
}, 200);
}
closeAllDesktopComponent(){
this.desktopComponent = {
showEventList: false,
@@ -114,6 +135,7 @@ this.processesbackend.GetActionsList().subscribe(res=>{
}
//if( window.innerWidth <= 1024){
this.adjastModalHeight();
const modal = await this.modalController.create({
component: EventListPage,
componentProps:{
@@ -142,6 +164,7 @@ this.processesbackend.GetActionsList().subscribe(res=>{
}
//if( window.innerWidth <= 1024){
this.adjastModalHeight();
const modal = await this.modalController.create({
component: ExpedientePage,
componentProps:{