Skip to content

Commit c5ee34e

Browse files
author
Robert Meyer
committed
fix: use block color for all link types
1 parent 2539687 commit c5ee34e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

packages/gantt/src/components/links/links.component.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,11 +174,19 @@ export class GanttLinksComponent implements OnInit, OnChanges, OnDestroy {
174174
let defaultColor: string = LinkColors.default;
175175
let activeColor: string = LinkColors.active;
176176

177-
if (link.type === GanttLinkType.fs && source.end.getTime() > target.start.getTime()) {
177+
if (link.type === GanttLinkType.ff && source.end.getTime() > target.end.getTime()) {
178178
defaultColor = LinkColors.blocked;
179179
activeColor = LinkColors.blocked;
180-
}
181-
if (link.color) {
180+
} else if (link.type === GanttLinkType.fs && source.end.getTime() > target.start.getTime()) {
181+
defaultColor = LinkColors.blocked;
182+
activeColor = LinkColors.blocked;
183+
} else if (link.type === GanttLinkType.sf && source.start.getTime() > target.end.getTime()) {
184+
defaultColor = LinkColors.blocked;
185+
activeColor = LinkColors.blocked;
186+
} else if (link.type === GanttLinkType.ss && source.start.getTime() > target.start.getTime()) {
187+
defaultColor = LinkColors.blocked;
188+
activeColor = LinkColors.blocked;
189+
} else if (link.color) {
182190
if (typeof link.color === 'string') {
183191
defaultColor = link.color;
184192
activeColor = link.color;

0 commit comments

Comments
 (0)