]> source.dussan.org Git - redmine.git/commitdiff
Fix that end markers in gantt PDF are misaligned (#19248).
authorGo MAEDA <maeda@farend.jp>
Fri, 20 Mar 2020 06:19:19 +0000 (06:19 +0000)
committerGo MAEDA <maeda@farend.jp>
Fri, 20 Mar 2020 06:19:19 +0000 (06:19 +0000)
Patch by Yuichi HARADA.

git-svn-id: http://svn.redmine.org/redmine/trunk@19595 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/redmine/helpers/gantt.rb

index cf5a6214af84aaef1f92eaaab77d7048456c092c..16f180090b19b4c4d2673fb167f785fa5910c97c 100644 (file)
@@ -631,7 +631,7 @@ module Redmine
             coords[:bar_start] = 0
           end
           if end_date < self.date_to
-            coords[:end] = end_date - self.date_from
+            coords[:end] = end_date - self.date_from + 1
             coords[:bar_end] = end_date - self.date_from + 1
           else
             coords[:bar_end] = self.date_to - self.date_from + 1
@@ -897,7 +897,7 @@ module Redmine
           if coords[:end]
             style = +""
             style << "top:#{params[:top]}px;"
-            style << "left:#{coords[:end] + params[:zoom]}px;"
+            style << "left:#{coords[:end]}px;"
             style << "width:15px;"
             output << view.content_tag(:div, '&nbsp;'.html_safe,
                                        :style => style,
@@ -1034,7 +1034,7 @@ module Redmine
             ])
           end
           if coords[:end]
-            x = params[:subject_width] + coords[:end] + params[:zoom]
+            x = params[:subject_width] + coords[:end]
             y = params[:top] - height / 2
             params[:image].fill('blue')
             params[:image].draw('polygon %d,%d %d,%d %d,%d %d,%d' % [