summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2020-03-20 04:56:20 +0000
committerGo MAEDA <maeda@farend.jp>2020-03-20 04:56:20 +0000
commitb025c9408bb8b134c5cc9655a4f4d8ec20fda795 (patch)
treeafcccec46dbb78008dd9f99f8d2f27f114e0ff5b
parent6323ef26ff889615e87cc5732ec9e72f8f5a620b (diff)
downloadredmine-b025c9408bb8b134c5cc9655a4f4d8ec20fda795.tar.gz
redmine-b025c9408bb8b134c5cc9655a4f4d8ec20fda795.zip
Merged r19592 from trunk to 4.0-stable (#23645).
git-svn-id: http://svn.redmine.org/redmine/branches/4.0-stable@19594 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/redmine/helpers/gantt.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index 312a3133a..32d7604ee 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -865,21 +865,24 @@ module Redmine
height /= 2 if markers
# Renders the task bar, with progress and late
if coords[:bar_start] && coords[:bar_end]
+ width = [1, coords[:bar_end] - coords[:bar_start]].max
params[:pdf].SetY(params[:top] + 1.5)
params[:pdf].SetX(params[:subject_width] + coords[:bar_start])
params[:pdf].SetFillColor(200, 200, 200)
- params[:pdf].RDMCell(coords[:bar_end] - coords[:bar_start], height, "", 0, 0, "", 1)
+ params[:pdf].RDMCell(width, height, "", 0, 0, "", 1)
if coords[:bar_late_end]
+ width = [1, coords[:bar_late_end] - coords[:bar_start]].max
params[:pdf].SetY(params[:top] + 1.5)
params[:pdf].SetX(params[:subject_width] + coords[:bar_start])
params[:pdf].SetFillColor(255, 100, 100)
- params[:pdf].RDMCell(coords[:bar_late_end] - coords[:bar_start], height, "", 0, 0, "", 1)
+ params[:pdf].RDMCell(width, height, "", 0, 0, "", 1)
end
if coords[:bar_progress_end]
+ width = [1, coords[:bar_progress_end] - coords[:bar_start]].max
params[:pdf].SetY(params[:top] + 1.5)
params[:pdf].SetX(params[:subject_width] + coords[:bar_start])
params[:pdf].SetFillColor(90, 200, 90)
- params[:pdf].RDMCell(coords[:bar_progress_end] - coords[:bar_start], height, "", 0, 0, "", 1)
+ params[:pdf].RDMCell(width, height, "", 0, 0, "", 1)
end
end
# Renders the markers