Skip to content

Commit

Permalink
fix: fix view date calc bug (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
walkerkay authored Jul 4, 2020
1 parent e28515b commit bd994b3
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Changelog
All notable changes to ngx-gantt will be documented in this file.

### [0.0.20](https://github.com/worktile/ngx-gantt/compare/0.0.18...0.0.20) (2020-07-03)

### [0.0.19](https://github.com/worktile/ngx-gantt/compare/0.0.18...0.0.19) (2020-07-02)

### [0.0.18](https://github.com/worktile/ngx-gantt/compare/0.0.17...0.0.18) (2020-06-30)
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@worktile/gantt",
"version": "0.0.19",
"version": "0.0.20",
"description": "A modern and powerful gantt chart component for Angular",
"keywords": [
"gantt",
Expand Down
2 changes: 1 addition & 1 deletion packages/gantt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@worktile/gantt",
"version": "0.0.19",
"version": "0.0.20",
"peerDependencies": {
"@angular/common": "^8.2.14",
"@angular/core": "^8.2.14"
Expand Down
8 changes: 6 additions & 2 deletions packages/gantt/src/gantt-upper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,12 @@ export abstract class GanttUpper {
let start = this.start;
let end = this.end;
this.originItems.forEach((item) => {
start = start ? Math.min(start, item.start) : item.start;
end = end ? Math.max(end, item.end) : item.end;
if (item.start) {
start = start ? Math.min(start, item.start) : item.start;
}
if (item.end) {
end = end ? Math.max(end, item.end) : item.end;
}
});
return {
start: new GanttDate(start),
Expand Down

0 comments on commit bd994b3

Please sign in to comment.