add changes for fullscreen chart view on monitor component as well

This commit is contained in:
Alex Martzios 2022-09-07 15:20:43 +03:00
parent e510da08de
commit 3d6cbf8b3e
2 changed files with 12 additions and 3 deletions

View File

@ -189,10 +189,10 @@
<!--<div *ngIf="properties.environment === 'development'">
Filtered: {{chartsActiveType.get(i + '-' + j).filtersApplied}} out of
{{countSelectedFilters()}}</div>-->
<iframe
<iframe [class.uk-blend-multiply]="!isFullscreen"
*ngIf=" !properties.disableFrameLoad && chartsActiveType.get(i + '-' + j).source !== 'image'"
[src]="chartsActiveType.get(i + '-' + j).safeResourceUrl"
class="uk-width-1-1 uk-blend-multiply" allowfullscreen="true" mozallowfullscreen="true"
class="uk-width-1-1" allowfullscreen="true" mozallowfullscreen="true"
[ngClass]="'uk-height-' + (indicator.height?indicator.height.toLowerCase():'medium')"></iframe>
<div *ngIf="properties.disableFrameLoad && chartsActiveType.get(i + '-' + j).source !== 'image'">
<img class="uk-width-1-1 uk-blend-multiply"

View File

@ -1,4 +1,4 @@
import {ChangeDetectorRef, Component, OnDestroy, OnInit, ViewChild, ViewRef} from '@angular/core';
import {ChangeDetectorRef, Component, HostListener, OnDestroy, OnInit, ViewChild, ViewRef} from '@angular/core';
import {ActivatedRoute, Params, Router} from '@angular/router';
import {DomSanitizer, Meta, Title} from '@angular/platform-browser';
import {EnvProperties} from '../openaireLibrary/utils/properties/env-properties';
@ -81,6 +81,15 @@ export class MonitorComponent implements OnInit, OnDestroy {
public stickyPageHeader: boolean = false;
public showDescriptionOverlay: boolean[] = [];
public isFullscreen: boolean = false;
@HostListener('fullscreenchange', ['$event'])
@HostListener('webkitfullscreenchange', ['$event'])
@HostListener('mozfullscreenchange', ['$event'])
@HostListener('MSFullscreenChange', ['$event'])
screenChange(event) {
this.isFullscreen = !this.isFullscreen;
}
constructor(
private route: ActivatedRoute,
private _router: Router,