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

fix(gantt): the fast right (left) dragging start (end) time, the width of the bar is wrong #INFR-7111 #351

Merged
merged 3 commits into from
Apr 11, 2023

Conversation

minlovehua
Copy link
Contributor

No description provided.

@minlovehua minlovehua closed this Apr 10, 2023
@minlovehua minlovehua reopened this Apr 10, 2023
@@ -376,9 +378,16 @@ export class GanttBarDrag implements OnDestroy {

this.item.updateDate(start, this.item.end);
} else {
if (this.flagDays > 0 && days <= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

if (this.flagDays > 0 && days <= 0) { 这个判断有点多余,直接去掉这样处理也没问题

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

Copy link
Contributor Author

@minlovehua minlovehua Apr 10, 2023

Choose a reason for hiding this comment

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

我们只需要在days第一次变成负数之后执行style修改。
如果没有这个判断的话,只要时间条一直往反方向拖(开始大于截止或截止小于开始),days就会一直是<0,就会不断进来执行这段style修改,不好。

@HandsomeButterball HandsomeButterball merged commit 683661c into v15.1.0-next Apr 11, 2023
@HandsomeButterball HandsomeButterball deleted the minlovehua/#INFR-7111 branch April 11, 2023 04:04
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