Merge Angular 16 Irish Monitor to develop #33
|
@ -170,7 +170,7 @@ export class Indicator {
|
|||
visibility: Visibility;
|
||||
defaultId: string;
|
||||
indicatorPaths: IndicatorPath[];
|
||||
descriptionOverlay: boolean = false;
|
||||
overlay: boolean = false;
|
||||
|
||||
constructor(name: string, description: string, additionalDescription:string, type: IndicatorType, width: IndicatorSize,height: IndicatorSize, visibility: Visibility, indicatorPaths: IndicatorPath[], defaultId: string = null) {
|
||||
this._id = null;
|
||||
|
|
|
@ -54,6 +54,9 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
|
|||
public numberResults: Map<string, number> = new Map<string, number>();
|
||||
public chartsActiveType: Map<string, IndicatorPath> = new Map<string, IndicatorPath>();
|
||||
public currentYear = new Date().getFullYear();
|
||||
public clipboard;
|
||||
public embedOverlay: boolean = false;
|
||||
public descriptionOverlay: boolean = false;
|
||||
|
||||
/** Services */
|
||||
protected sanitizer: DomSanitizer;
|
||||
|
@ -76,6 +79,7 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
|
|||
this.isMobile = isMobile;
|
||||
this.cdr.detectChanges();
|
||||
});
|
||||
this.createClipboard();
|
||||
}
|
||||
|
||||
protected setView(params: Params) {
|
||||
|
@ -404,14 +408,35 @@ export abstract class MonitorIndicatorStakeholderBaseComponent extends Indicator
|
|||
window.print();
|
||||
}
|
||||
|
||||
toggleDescriptionOverlay(event, indicator: Indicator) {
|
||||
toggleOverlay(event, indicator: Indicator, overlayType: string) {
|
||||
event.stopPropagation();
|
||||
indicator.descriptionOverlay = !indicator.descriptionOverlay;
|
||||
indicator.overlay = !indicator.overlay;
|
||||
if (overlayType == 'embed') {
|
||||
this.embedOverlay = !this.embedOverlay;
|
||||
}
|
||||
if (overlayType == 'desc') {
|
||||
this.descriptionOverlay = !this.descriptionOverlay;
|
||||
}
|
||||
}
|
||||
|
||||
closeDescriptionOverlay(event: ClickEvent, indicator: Indicator) {
|
||||
if(event.clicked && indicator.descriptionOverlay) {
|
||||
indicator.descriptionOverlay = false;
|
||||
closeOverlay(event: ClickEvent, indicator: Indicator, overlayType: string) {
|
||||
if(event.clicked && indicator.overlay) {
|
||||
indicator.overlay = false;
|
||||
if (overlayType == 'embed') {
|
||||
this.embedOverlay = false;
|
||||
}
|
||||
if (overlayType == 'desc') {
|
||||
this.descriptionOverlay = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private createClipboard() {
|
||||
if (typeof window !== 'undefined') {
|
||||
delete this.clipboard;
|
||||
let Clipboard;
|
||||
Clipboard = require('clipboard');
|
||||
this.clipboard = new Clipboard('.clipboard_btn');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue