Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support custom header and item height #431 #449

Merged
merged 12 commits into from
Mar 15, 2024

Conversation

hjm100
Copy link
Contributor

@hjm100 hjm100 commented Mar 11, 2024

No description provided.

@@ -1,6 +1,6 @@
<ngx-gantt-root [sideWidth]="300">
<ng-template #sideTemplate>
<div class="gantt-flat-side-header">项目</div>
<div class="gantt-flat-side-header" [style.height.px]="styles.headerHeight" [style.line-height.px]="styles.headerHeight">项目</div>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

示例无所谓,不需要改成动态的

@@ -10,7 +10,7 @@
[class.weekend]="point.additions?.isWeekend"
*ngFor="let point of view.primaryDatePoints; trackBy: trackBy"
[attr.x]="point.x"
[attr.y]="point.y"
[attr.y]="primaryDatePointTop"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 y 的计算在视图里头,尽量在视图中去计算这个 y 值,而不是在组件内去计算,不同的视图 y 的规则可能是不一样的

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个 y 的计算在视图里头,尽量在视图中去计算这个 y 值,而不是在组件内去计算,不同的视图 y 的规则可能是不一样的

可以在创建 view的时候,把需要的 height 传入进去,这样内部就可以计算 y 值了

@@ -11,14 +11,11 @@ order: 50
@use '@worktile/gantt/styles/variables.scss' with (
// basic
$gantt-color: #333,
$gantt-header-height: 44px,
$gantt-border-color: #eee,
$gantt-bg-color: #fff,
$gantt-side-shadow: 12px 0 16px -10px rgba(0, 0, 0, 0.15),
$gantt-container-background-color: #fafafa,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

直接去掉这些变量的话,不知道之前用到这些变量的应用会不会收到影响,得确认下

@walkerkay walkerkay changed the title #INFR-11826 gantt custom global style configurations feat: support custom header and item height #431 Mar 15, 2024
@walkerkay walkerkay merged commit 986ed80 into worktile:master Mar 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants