Skip to content

Commit

Permalink
fix(demo): update flex-layout
Browse files Browse the repository at this point in the history
  • Loading branch information
kKen94 committed Jan 30, 2020
1 parent 35a8987 commit 7e18674
Show file tree
Hide file tree
Showing 3 changed files with 1,721 additions and 1,678 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"@angular/common": "~9.0.0-rc.10",
"@angular/compiler": "~9.0.0-rc.10",
"@angular/core": "~9.0.0-rc.10",
"@angular/flex-layout": "^8.0.0-beta.27",
"@angular/flex-layout": "^9.0.0-beta.28",
"@angular/forms": "~9.0.0-rc.10",
"@angular/material": "^9.0.0-rc.8",
"@angular/platform-browser": "~9.0.0-rc.10",
Expand All @@ -67,9 +67,9 @@
"@commitlint/cli": "^8.2.0",
"@commitlint/config-conventional": "^8.2.0",
"@commitlint/prompt": "^8.2.0",
"@semantic-release/changelog": "^3.0.5",
"@semantic-release/exec": "^4.0.0",
"@semantic-release/git": "^8.0.0",
"@semantic-release/changelog": "^5.0.0",
"@semantic-release/exec": "^5.0.0",
"@semantic-release/git": "^9.0.0",
"@types/node": "^12.11.1",
"angular-cli-ghpages": "^0.6.0",
"angular-tslint-rules": "^1.20.1",
Expand All @@ -80,7 +80,7 @@
"npm-run-all": "^4.1.5",
"prettier": "^1.19.1",
"replace-json-property": "^1.4.1",
"semantic-release": "^16.0.1",
"semantic-release": "^17.0.1",
"ts-node": "~7.0.0",
"tslint": "^5.20.1",
"tslint-config-prettier": "^1.18.0",
Expand Down
8 changes: 7 additions & 1 deletion projects/lib/src/lib/bar/bar.service.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
import { Injectable } from '@angular/core';
import { NgxProgressService } from '../ngx-progress.service';

@Injectable({ providedIn: 'root' })
export class BarService {
value = 0;
progress = 0;
interval: number;

constructor(private readonly ngxService: NgxProgressService) {}

start(): void {
this.interval = setInterval(() => {
this.value += 0.005;
this.progress = Math.round((Math.atan(this.value) / (Math.PI / 2)) * 100 * 1000) / 1000;
if (this.progress >= 100) {
clearInterval(this.interval);
}
}, 50);
}, 100);
}

stop(): void {
Expand All @@ -35,6 +38,9 @@ export class BarService {
}

increment(value: number): void {
if (!this.ngxService.isEnable) {
return;
}
this.progress += value;
this.value = Math.tan((this.progress / 100) * (Math.PI / 2));
}
Expand Down
Loading

0 comments on commit 7e18674

Please sign in to comment.