Skip to content

Commit 3d1ba29

Browse files
author
Robert Meyer
committed
Merge remote-tracking branch 'upstream/master' into use-blocked-for-all-link-types
2 parents 216cd40 + 2539687 commit 3d1ba29

14 files changed

+54
-26
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [19.0.5](https://github.com/worktile/ngx-gantt/compare/19.0.4...19.0.5) (2025-07-04)
6+
7+
### Bug Fixes
8+
9+
- **gantt:** 修复win系统,左侧表格横向滚轴按钮不生效,滚动条在可视窗口展示 ([#555](https://github.com/worktile/ngx-gantt/issues/555)) ([5108e2b](https://github.com/worktile/ngx-gantt/commit/5108e2b8449e1f8010e9076c42f39746a26f924f))
10+
11+
## [19.0.4](https://github.com/worktile/ngx-gantt/compare/19.0.3...19.0.4) (2025-06-23)
12+
13+
### Bug Fixes
14+
15+
- fix layout side scroll error in advanced use [#543](https://github.com/worktile/ngx-gantt/issues/543) ([2daa19f](https://github.com/worktile/ngx-gantt/commit/2daa19fc82fc1eb32399b4e4594a98c62fa94cb1))
16+
517
## [19.0.3](https://github.com/worktile/ngx-gantt/compare/19.0.2...19.0.3) (2025-05-23)
618

719
## [19.0.2](https://github.com/worktile/ngx-gantt/compare/19.0.1...19.0.2) (2025-05-09)

example/src/app/gantt-advanced/component/flat.component.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
<ngx-gantt-root [sideWidth]="300">
22
<ng-template #sideTemplate>
3-
<div [style.flex]="'auto'">
4-
<div class="gantt-flat-side-header">项目</div>
5-
<div class="gantt-flat-side-body">
6-
<div class="gantt-group" *ngFor="let group of groups; trackBy: trackBy">
7-
<div class="gantt-group-content" [style.height.px]="group.mergedItems?.length * (styles.lineHeight + 10) - 10">
8-
{{ group.title }}
9-
</div>
3+
<div class="gantt-flat-side-header">项目</div>
4+
<div class="gantt-flat-side-body">
5+
<div class="gantt-group" *ngFor="let group of groups; trackBy: trackBy">
6+
<div class="gantt-group-content" [style.height.px]="group.mergedItems?.length * (styles.lineHeight + 10) - 10">
7+
{{ group.title }}
108
</div>
119
</div>
1210
</div>

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@worktile/gantt",
3-
"version": "19.0.3",
3+
"version": "19.0.5",
44
"author": "walkerkay001",
55
"license": "MIT",
66
"description": "A modern and powerful gantt chart component for Angular",

packages/gantt/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@worktile/gantt",
3-
"version": "19.0.3",
3+
"version": "19.0.5",
44
"schematics": "./schematics/collection.json",
55
"author": "walkerkay001",
66
"license": "MIT",

packages/gantt/src/components/scrollbar/scrollbar.component.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
[style.height.px]="ganttRoot?.horizontalScrollbarHeight + 1"
55
[style.right.px]="ganttRoot?.verticalScrollbarWidth"
66
>
7-
<div class="gantt-table-scrollbar" [class.with-scrollbar]="ganttRoot?.horizontalScrollbarHeight" [style.width.px]="tableWidth"></div>
7+
<div class="gantt-table-scrollbar" [class.with-scrollbar]="ganttRoot?.horizontalScrollbarHeight" [style.width.px]="tableWidth">
8+
<div class="h-100" [style.width.px]="ganttRoot.ganttUpper['ganttTableBody']?.elementRef?.nativeElement?.offsetWidth - 1 || 0"></div>
9+
</div>
810
<div class="gantt-main-scrollbar">
911
<div class="h-100" [style.width.px]="ganttRoot['view']?.width"></div>
1012
</div>

packages/gantt/src/components/table/body/gantt-table-body.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
</div>
9090
</div>
9191
}
92-
<div class="gantt-table-column"></div>
92+
<div class="gantt-table-column gantt-table-column-placeholder"></div>
9393
<ng-template
9494
[ngTemplateOutlet]="rowAfterTemplate"
9595
[ngTemplateOutletContext]="{ $implicit: item.origin, item: item.origin }"

packages/gantt/src/components/table/body/gantt-table-body.component.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import {
55
AfterViewInit,
66
ChangeDetectorRef,
77
Component,
8+
ElementRef,
89
EventEmitter,
910
HostBinding,
1011
Inject,
@@ -113,11 +114,14 @@ export class GanttTableBodyComponent implements OnInit, OnDestroy, AfterViewInit
113114

114115
public footerContainer: Element;
115116

117+
public tableScrollbarContainer: Element;
118+
116119
constructor(
117120
@Inject(GANTT_ABSTRACT_TOKEN) public gantt: GanttAbstractComponent,
118121
@Inject(GANTT_UPPER_TOKEN) public ganttUpper: GanttUpper,
119122
private cdr: ChangeDetectorRef,
120123
@Inject(DOCUMENT) private document: Document,
124+
protected elementRef: ElementRef<HTMLElement>,
121125
private ngZone: NgZone
122126
) {}
123127

@@ -166,27 +170,25 @@ export class GanttTableBodyComponent implements OnInit, OnDestroy, AfterViewInit
166170
this.sideContainer = this.document.getElementsByClassName('gantt-side-container')[0];
167171
this.headerContainer = this.document.getElementsByClassName('gantt-table-header-container')[0];
168172
this.footerContainer = this.document.getElementsByClassName('gantt-table-footer')[0];
173+
this.tableScrollbarContainer = this.document.getElementsByClassName('gantt-table-scrollbar')[0];
169174
this.monitorScrollChange();
170175
}
171176

172177
private monitorScrollChange() {
173178
const scrollObservers = [
174179
fromEvent(this.sideContainer, 'scroll', passiveListenerOptions),
175-
fromEvent(this.headerContainer, 'scroll', passiveListenerOptions)
180+
fromEvent(this.headerContainer, 'scroll', passiveListenerOptions),
181+
fromEvent(this.tableScrollbarContainer, 'scroll', passiveListenerOptions)
176182
];
177183
this.ngZone.runOutsideAngular(() =>
178184
merge(...scrollObservers)
179185
.pipe(takeUntil(this.destroy$))
180186
.subscribe((event) => {
181187
const target = event.currentTarget as HTMLElement;
182-
const classList = target.classList;
183-
if (classList.contains('gantt-table-header-container')) {
184-
this.sideContainer && (this.sideContainer.scrollLeft = target.scrollLeft);
185-
this.footerContainer && (this.footerContainer.scrollLeft = target.scrollLeft);
186-
} else {
187-
this.headerContainer && (this.headerContainer.scrollLeft = target.scrollLeft);
188-
this.footerContainer && (this.footerContainer.scrollLeft = target.scrollLeft);
189-
}
188+
this.headerContainer && (this.headerContainer.scrollLeft = target.scrollLeft);
189+
this.sideContainer && (this.sideContainer.scrollLeft = target.scrollLeft);
190+
this.tableScrollbarContainer && (this.tableScrollbarContainer.scrollLeft = target.scrollLeft);
191+
this.footerContainer && (this.footerContainer.scrollLeft = target.scrollLeft);
190192
})
191193
);
192194
}

packages/gantt/src/components/table/gantt-table.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
border-right: none;
1717
}
1818

19-
&:last-child {
19+
&.gantt-table-column-placeholder {
2020
padding: 0;
2121
border: 1px solid variables.$gantt-border-color;
2222
border-right: none;
@@ -70,7 +70,7 @@
7070
&:nth-last-child(2) {
7171
border-right: none;
7272
}
73-
&:last-child {
73+
&.gantt-table-column-placeholder {
7474
padding: 0;
7575
border: 1px solid variables.$gantt-border-color;
7676
border-right: none;
@@ -205,6 +205,7 @@
205205

206206
.gantt-table-body {
207207
display: block;
208+
flex: 1;
208209
.gantt-table-group {
209210
display: flex;
210211
background: variables.$gantt-group-background-color;

packages/gantt/src/components/table/header/gantt-table-header.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
></div>
1818
</div>
1919
}
20-
<div class="gantt-table-column"></div>
20+
<div class="gantt-table-column gantt-table-column-placeholder"></div>
2121
</div>
2222

2323
@if (gantt?.table?.settingsSlot) {

0 commit comments

Comments
 (0)