Skip to content

Commit

Permalink
merged
Browse files Browse the repository at this point in the history
  • Loading branch information
andreyfoggy committed Mar 24, 2020
2 parents c9d5ca0 + c080dcb commit 542b788
Show file tree
Hide file tree
Showing 20 changed files with 461 additions and 4 deletions.
395 changes: 395 additions & 0 deletions dist/corona-map/3rdpartylicenses.txt

Large diffs are not rendered by default.

Binary file added dist/corona-map/assets/icons/circle-orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/corona-map/assets/icons/circle-purple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/corona-map/assets/icons/circle-red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/corona-map/assets/icons/diamond-orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/corona-map/assets/icons/diamond-purple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/corona-map/assets/icons/diamond-red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added dist/corona-map/favicon.ico
Binary file not shown.
13 changes: 13 additions & 0 deletions dist/corona-map/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>CoronaMap</title>
<base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.3ff695c00d717f2d2a11.css"></head>
<body>
<app-root></app-root>
<script src="runtime-es2015.c5fa8325f89fc516600b.js" type="module"></script><script src="runtime-es5.c5fa8325f89fc516600b.js" nomodule defer></script><script src="polyfills-es5.3e8196928d184a6e5319.js" nomodule defer></script><script src="polyfills-es2015.5b10b8fd823b6392f1fd.js" type="module"></script><script src="main-es2015.181aedd2bdeacc562b88.js" type="module"></script><script src="main-es5.181aedd2bdeacc562b88.js" nomodule defer></script></body>
</html>
1 change: 1 addition & 0 deletions dist/corona-map/main-es2015.181aedd2bdeacc562b88.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/corona-map/main-es5.181aedd2bdeacc562b88.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/corona-map/polyfills-es2015.5b10b8fd823b6392f1fd.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/corona-map/polyfills-es5.3e8196928d184a6e5319.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/corona-map/runtime-es2015.c5fa8325f89fc516600b.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/corona-map/runtime-es5.c5fa8325f89fc516600b.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
27 changes: 27 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
"e2e": "ng e2e",
"heroku-postbuild": "ng build --prod"
},
"private": true,
"dependencies": {
Expand All @@ -26,7 +27,9 @@
"firebase": "^7.12.0",
"rxjs": "^6.5.4",
"tslib": "^1.10.0",
"zone.js": "^0.10.3"
"zone.js": "^0.10.3",
"express": "^4.17.1",
"path": "^0.12.7"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.900.1",
Expand All @@ -37,6 +40,7 @@
"@types/jasminewd2": "~2.0.3",
"@types/node": "^13.9.2",
"codelyzer": "^5.2.1",
"express": "^4.17.1",
"jasmine-core": "^3.5.0",
"jasmine-spec-reporter": "^4.2.1",
"karma": "^4.4.1",
Expand All @@ -45,6 +49,7 @@
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "^3.1.1",
"karma-jasmine-html-reporter": "^1.5.2",
"path": "^0.12.7",
"protractor": "^5.4.3",
"rxjs-tslint": "^0.1.7",
"ts-node": "~7.0.0",
Expand Down
3 changes: 3 additions & 0 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ <h2>Поширення COVID-19 в Україні</h2>

<div class="map-description">
<img src="assets/icons/circle-orange.png" alt="" class="src"><div>- регіон де виявили захворювання на короновірус</div>
<img src="assets/icons/circle-red.png" alt="" class="src"><div>- більше 20 випадків</div>
<img src="assets/icons/circle-purple.png" alt="" class="src"><div>- більше 100 випадків</div>
<img src="assets/icons/diamond-orange.png" alt="" class="src"><div>- ромбом відмічаются регіони зі смертельними випадками</div>
</div>
<div class="general-info">
<div style="color: #aaa;">Усього випадків виявлено: {{ casesAll }}</div>
Expand Down
12 changes: 10 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { Component, ViewChild, OnInit } from '@angular/core';
import { MapService } from './services/map.service';
import { markers } from './app.constants';

enum IconColors {
orange = 20
}
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
Expand All @@ -18,15 +21,20 @@ export class AppComponent implements OnInit {
}

ngOnInit() {
this.markers = markers.map(marker => {
return {...marker, icon: 'assets/icons/circle-orange.png'};
this.markers = markers.map((marker: any) => {
marker.icon = this.getIcon(marker.cases, marker.deaths);
return marker;
});
this.markers.forEach(marker => {
if (Number(marker.cases)) { this.casesAll += marker.cases; }
if (Number(marker.deaths)) { this.deathsAll += marker.deaths; }
});
}

private getIcon(cases, death) {
return 'assets/icons/circle-orange.png'
}

public onMarkerClick(e, infowindow) {
this.closePrevious(infowindow);
}
Expand Down

0 comments on commit 542b788

Please sign in to comment.