summaryrefslogtreecommitdiffstats
path: root/lib/redmine
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-11 00:56:56 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2012-09-11 00:56:56 +0000
commitd3d719c0e75086ed874d5af70764242511ee5823 (patch)
tree6678e5569ce387f8b940c5e0aa2431ea3fc03c8f /lib/redmine
parent03aa7037a556cf18d333531564a61147e702d1bc (diff)
downloadredmine-d3d719c0e75086ed874d5af70764242511ee5823.tar.gz
redmine-d3d719c0e75086ed874d5af70764242511ee5823.zip
gantt: code layout cleanup image_task method of lib/redmine/helpers/gantt.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10354 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine')
-rw-r--r--lib/redmine/helpers/gantt.rb23
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index cdec9d424..8187efe51 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -786,14 +786,23 @@ module Redmine
# Renders the task bar, with progress and late
if coords[:bar_start] && coords[:bar_end]
params[:image].fill('#aaa')
- params[:image].rectangle(params[:subject_width] + coords[:bar_start], params[:top], params[:subject_width] + coords[:bar_end], params[:top] - height)
+ params[:image].rectangle(params[:subject_width] + coords[:bar_start],
+ params[:top],
+ params[:subject_width] + coords[:bar_end],
+ params[:top] - height)
if coords[:bar_late_end]
params[:image].fill('#f66')
- params[:image].rectangle(params[:subject_width] + coords[:bar_start], params[:top], params[:subject_width] + coords[:bar_late_end], params[:top] - height)
+ params[:image].rectangle(params[:subject_width] + coords[:bar_start],
+ params[:top],
+ params[:subject_width] + coords[:bar_late_end],
+ params[:top] - height)
end
if coords[:bar_progress_end]
params[:image].fill('#00c600')
- params[:image].rectangle(params[:subject_width] + coords[:bar_start], params[:top], params[:subject_width] + coords[:bar_progress_end], params[:top] - height)
+ params[:image].rectangle(params[:subject_width] + coords[:bar_start],
+ params[:top],
+ params[:subject_width] + coords[:bar_progress_end],
+ params[:top] - height)
end
end
# Renders the markers
@@ -802,19 +811,21 @@ module Redmine
x = params[:subject_width] + coords[:start]
y = params[:top] - height / 2
params[:image].fill('blue')
- params[:image].polygon(x-4, y, x, y-4, x+4, y, x, y+4)
+ params[:image].polygon(x - 4, y, x, y - 4, x + 4, y, x, y + 4)
end
if coords[:end]
x = params[:subject_width] + coords[:end] + params[:zoom]
y = params[:top] - height / 2
params[:image].fill('blue')
- params[:image].polygon(x-4, y, x, y-4, x+4, y, x, y+4)
+ params[:image].polygon(x - 4, y, x, y - 4, x + 4, y, x, y + 4)
end
end
# Renders the label on the right
if options[:label]
params[:image].fill('black')
- params[:image].text(params[:subject_width] + (coords[:bar_end] || 0) + 5,params[:top] + 1, options[:label])
+ params[:image].text(params[:subject_width] + (coords[:bar_end] || 0) + 5,
+ params[:top] + 1,
+ options[:label])
end
end
end