Skip to content

Commit

Permalink
Merge pull request #619 from LINCnil/prepare-version-3.0.3
Browse files Browse the repository at this point in the history
Version 3.0.3
  • Loading branch information
kevin-atnos authored Jan 4, 2022
2 parents 1511113 + 2b192b4 commit 9d6f1c4
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 14 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# Pia [v3.0.2](https://github.com/LINCnil/pia/releases/tag/v3.0.2)

# Le logiciel PIA / The PIA Software

## Présentation / Presentation
Expand All @@ -20,7 +18,7 @@ To translate the software, we invite you to visit the [related repository](https

# Information de développement / Dev information

![CI](https://github.com/atnos/pia/workflows/integration-tests/badge.svg?branch=master)
![CI](https://github.com/lincnil/pia/workflows/integration-tests/badge.svg?branch=master)

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 11.0.1.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pia",
"version": "3.0.2",
"version": "3.0.3",
"license": "GPLV3",
"author": "ATNOS",
"repository": "https://github.com/LINCnil/pia",
Expand Down
22 changes: 13 additions & 9 deletions src/app/modules/pia/export/export.component.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core';
import * as FileSaver from 'file-saver';
import * as html2canvas from 'html2canvas';
import html2canvas from 'html2canvas';
import { svgAsPngUri } from 'save-svg-as-png';
import { PiaService } from 'src/app/services/pia.service';
import { AppDataService } from 'src/app/services/app-data.service';
Expand Down Expand Up @@ -495,14 +495,16 @@ export class ExportComponent implements OnInit {
* Download the action plan overview as an image
* @async
*/
async getActionPlanOverviewImg(): Promise<void> {
async getActionPlanOverviewImg(): Promise<string> {
return new Promise((resolve, reject) => {
setTimeout(() => {
const actionPlanOverviewImg = document.querySelector(
'#actionPlanOverviewImg'
);
if (actionPlanOverviewImg) {
html2canvas(actionPlanOverviewImg, { scale: 1.4 }).then(canvas => {
html2canvas(actionPlanOverviewImg as HTMLElement, {
scale: 1.4
}).then(canvas => {
if (canvas) {
const img = canvas.toDataURL();
resolve(img);
Expand All @@ -517,19 +519,21 @@ export class ExportComponent implements OnInit {
* Download the risks cartography as an image
* @async
*/
async getRisksCartographyImg(): Promise<void> {
async getRisksCartographyImg(): Promise<string> {
return new Promise((resolve, reject) => {
setTimeout(() => {
const risksCartographyImg = document.querySelector(
'#risksCartographyImg'
);
if (risksCartographyImg) {
html2canvas(risksCartographyImg, { scale: 1.4 }).then(canvas => {
if (canvas) {
const img = canvas.toDataURL();
resolve(img);
html2canvas(risksCartographyImg as HTMLElement, { scale: 1.4 }).then(
canvas => {
if (canvas) {
const img = canvas.toDataURL();
resolve(img);
}
}
});
);
}
}, 250);
});
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const environment = {
name: 'production',
production: true,
version: '3.0.2'
version: '3.0.3'
};

0 comments on commit 9d6f1c4

Please sign in to comment.