Skip to content

Commit

Permalink
Dependency line corrections (barMargin)
Browse files Browse the repository at this point in the history
  • Loading branch information
DlhSoftTeam committed Nov 27, 2019
1 parent 77d97df commit 100d1fd
Show file tree
Hide file tree
Showing 301 changed files with 906 additions and 906 deletions.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -383,15 +383,15 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) {
x = ganttChartView.getChartPosition(predecessorItem.item.start);
if ((predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled)))
x -= h / 5 + 0.25;
x -= settings.barMargin * 5 / 8 + 0.25;
else if (predecessorItem.item.isMilestone)
x -= h / 4;
x1 = x - extraLineLength;
}
else {
x = ganttChartView.getChartPosition(predecessorItem.item.finish) - 1;
if (predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled))
x += h / 5 + 0.25;
x += settings.barMargin * 5 / 8 + 0.25;
else if (predecessorItem.item.isMilestone)
x += h / 4;
else {
Expand All @@ -408,7 +408,7 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'FinishFinish' || predecessorItem.dependencyType == 'FF')) {
horizontal = true;
if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))
x += h / 5 + 1;
x += settings.barMargin * 5 / 8 + 1;
else if (item.isMilestone)
x += h / 4 + 1;
else {
Expand All @@ -434,7 +434,7 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS')) {
horizontal = true;
if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))
x -= h / 5 + 1;
x -= settings.barMargin * 5 / 8 + 1;
else if (item.isMilestone)
x -= h / 4 + 1;
x2 = x - extraLineLength;
Expand Down Expand Up @@ -475,9 +475,9 @@ function initializeGanttChartTemplates(settings, theme) {
if (horizontal)
y = h2 + 0.5;
else if (y <= 0)
y = h / 4 - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace;
y = settings.barMargin - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace;
else
y = h - h / 4 + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace;
y = h - settings.barMargin + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace;
if (horizontal) {
if (x2 > x - arrowSpace)
arrowSpace = -arrowSpace;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -383,15 +383,15 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) {
x = ganttChartView.getChartPosition(predecessorItem.item.start);
if ((predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled)))
x -= h / 5 + 0.25;
x -= settings.barMargin * 5 / 8 + 0.25;
else if (predecessorItem.item.isMilestone)
x -= h / 4;
x1 = x - extraLineLength;
}
else {
x = ganttChartView.getChartPosition(predecessorItem.item.finish) - 1;
if (predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled))
x += h / 5 + 0.25;
x += settings.barMargin * 5 / 8 + 0.25;
else if (predecessorItem.item.isMilestone)
x += h / 4;
else {
Expand All @@ -408,7 +408,7 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'FinishFinish' || predecessorItem.dependencyType == 'FF')) {
horizontal = true;
if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))
x += h / 5 + 1;
x += settings.barMargin * 5 / 8 + 1;
else if (item.isMilestone)
x += h / 4 + 1;
else {
Expand All @@ -434,7 +434,7 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS')) {
horizontal = true;
if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))
x -= h / 5 + 1;
x -= settings.barMargin * 5 / 8 + 1;
else if (item.isMilestone)
x -= h / 4 + 1;
x2 = x - extraLineLength;
Expand Down Expand Up @@ -475,9 +475,9 @@ function initializeGanttChartTemplates(settings, theme) {
if (horizontal)
y = h2 + 0.5;
else if (y <= 0)
y = h / 4 - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace;
y = settings.barMargin - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace;
else
y = h - h / 4 + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace;
y = h - settings.barMargin + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace;
if (horizontal) {
if (x2 > x - arrowSpace)
arrowSpace = -arrowSpace;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -383,15 +383,15 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) {
x = ganttChartView.getChartPosition(predecessorItem.item.start);
if ((predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled)))
x -= h / 5 + 0.25;
x -= settings.barMargin * 5 / 8 + 0.25;
else if (predecessorItem.item.isMilestone)
x -= h / 4;
x1 = x - extraLineLength;
}
else {
x = ganttChartView.getChartPosition(predecessorItem.item.finish) - 1;
if (predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled))
x += h / 5 + 0.25;
x += settings.barMargin * 5 / 8 + 0.25;
else if (predecessorItem.item.isMilestone)
x += h / 4;
else {
Expand All @@ -408,7 +408,7 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'FinishFinish' || predecessorItem.dependencyType == 'FF')) {
horizontal = true;
if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))
x += h / 5 + 1;
x += settings.barMargin * 5 / 8 + 1;
else if (item.isMilestone)
x += h / 4 + 1;
else {
Expand All @@ -434,7 +434,7 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS')) {
horizontal = true;
if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))
x -= h / 5 + 1;
x -= settings.barMargin * 5 / 8 + 1;
else if (item.isMilestone)
x -= h / 4 + 1;
x2 = x - extraLineLength;
Expand Down Expand Up @@ -475,9 +475,9 @@ function initializeGanttChartTemplates(settings, theme) {
if (horizontal)
y = h2 + 0.5;
else if (y <= 0)
y = h / 4 - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace;
y = settings.barMargin - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace;
else
y = h - h / 4 + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace;
y = h - settings.barMargin + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace;
if (horizontal) {
if (x2 > x - arrowSpace)
arrowSpace = -arrowSpace;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -383,15 +383,15 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) {
x = ganttChartView.getChartPosition(predecessorItem.item.start);
if ((predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled)))
x -= h / 5 + 0.25;
x -= settings.barMargin * 5 / 8 + 0.25;
else if (predecessorItem.item.isMilestone)
x -= h / 4;
x1 = x - extraLineLength;
}
else {
x = ganttChartView.getChartPosition(predecessorItem.item.finish) - 1;
if (predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled))
x += h / 5 + 0.25;
x += settings.barMargin * 5 / 8 + 0.25;
else if (predecessorItem.item.isMilestone)
x += h / 4;
else {
Expand All @@ -408,7 +408,7 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'FinishFinish' || predecessorItem.dependencyType == 'FF')) {
horizontal = true;
if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))
x += h / 5 + 1;
x += settings.barMargin * 5 / 8 + 1;
else if (item.isMilestone)
x += h / 4 + 1;
else {
Expand All @@ -434,7 +434,7 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS')) {
horizontal = true;
if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))
x -= h / 5 + 1;
x -= settings.barMargin * 5 / 8 + 1;
else if (item.isMilestone)
x -= h / 4 + 1;
x2 = x - extraLineLength;
Expand Down Expand Up @@ -475,9 +475,9 @@ function initializeGanttChartTemplates(settings, theme) {
if (horizontal)
y = h2 + 0.5;
else if (y <= 0)
y = h / 4 - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace;
y = settings.barMargin - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace;
else
y = h - h / 4 + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace;
y = h - settings.barMargin + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace;
if (horizontal) {
if (x2 > x - arrowSpace)
arrowSpace = -arrowSpace;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -383,15 +383,15 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS' || predecessorItem.dependencyType == 'StartFinish' || predecessorItem.dependencyType == 'SF')) {
x = ganttChartView.getChartPosition(predecessorItem.item.start);
if ((predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled)))
x -= h / 5 + 0.25;
x -= settings.barMargin * 5 / 8 + 0.25;
else if (predecessorItem.item.isMilestone)
x -= h / 4;
x1 = x - extraLineLength;
}
else {
x = ganttChartView.getChartPosition(predecessorItem.item.finish) - 1;
if (predecessorItem.item.hasChildren && (typeof predecessorItem.item.isSummaryEnabled === undefinedType || predecessorItem.item.isSummaryEnabled))
x += h / 5 + 0.25;
x += settings.barMargin * 5 / 8 + 0.25;
else if (predecessorItem.item.isMilestone)
x += h / 4;
else {
Expand All @@ -408,7 +408,7 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'FinishFinish' || predecessorItem.dependencyType == 'FF')) {
horizontal = true;
if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))
x += h / 5 + 1;
x += settings.barMargin * 5 / 8 + 1;
else if (item.isMilestone)
x += h / 4 + 1;
else {
Expand All @@ -434,7 +434,7 @@ function initializeGanttChartTemplates(settings, theme) {
if (typeof predecessorItem.dependencyType !== undefinedType && (predecessorItem.dependencyType == 'StartStart' || predecessorItem.dependencyType == 'SS')) {
horizontal = true;
if (item.hasChildren && (typeof item.isSummaryEnabled === undefinedType || item.isSummaryEnabled))
x -= h / 5 + 1;
x -= settings.barMargin * 5 / 8 + 1;
else if (item.isMilestone)
x -= h / 4 + 1;
x2 = x - extraLineLength;
Expand Down Expand Up @@ -475,9 +475,9 @@ function initializeGanttChartTemplates(settings, theme) {
if (horizontal)
y = h2 + 0.5;
else if (y <= 0)
y = h / 4 - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace;
y = settings.barMargin - (!item.isMilestone && !item.hasChildren ? barMargin : 1) - arrowSpace;
else
y = h - h / 4 + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace;
y = h - settings.barMargin + (!item.isMilestone && !item.hasChildren ? barMargin : 1) + arrowSpace;
if (horizontal) {
if (x2 > x - arrowSpace)
arrowSpace = -arrowSpace;
Expand Down
Binary file not shown.
Loading

0 comments on commit 100d1fd

Please sign in to comment.