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

3348 bug vtable gantt update scale #3358

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"comment": "fix: updateScales to quarter taskbar size error #3348\n\n",
"type": "none",
"packageName": "@visactor/vtable"
}
],
"packageName": "@visactor/vtable",
"email": "[email protected]"
}
4 changes: 3 additions & 1 deletion packages/vtable-gantt/src/tools/util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { isValid } from '@visactor/vutils';
import { DayTimes } from '../gantt-helper';

/**
* throttle 保障了首次立即执行 后续触发的回调执行间隔delay时间 区别于throttle2 最后执行时机会提前
Expand Down Expand Up @@ -706,7 +707,8 @@ export function computeCountToTimeScale(
Math.floor(adjusted_date.getMonth() / 3) -
Math.floor(startDate.getMonth() / 3);
difference +=
(adjusted_date.getDate() - startDate.getDate()) /
(adjusted_date.getTime() - startDate.getTime()) /
DayTimes /
(3 * new Date(adjusted_date.getFullYear(), adjusted_date.getMonth() + 1, 0).getDate());
break;
case 'year':
Expand Down
Loading