Skip to content

Commit 2cfe5ce

Browse files
authored
use block color for all link types (#551)
1 parent c00f2bc commit 2cfe5ce

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,20 @@ 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()) {
178+
defaultColor = LinkColors.blocked;
179+
activeColor = LinkColors.blocked;
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()) {
178187
defaultColor = LinkColors.blocked;
179188
activeColor = LinkColors.blocked;
180189
}
190+
181191
if (link.color) {
182192
if (typeof link.color === 'string') {
183193
defaultColor = link.color;

0 commit comments

Comments
 (0)