diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb
index 3089028..66890b1 100644
--- a/app/views/gantts/show.html.erb
+++ b/app/views/gantts/show.html.erb
@@ -49,7 +49,7 @@ if @gantt.zoom > 1
end
# Width of the entire chart
-g_width = (@gantt.date_to - @gantt.date_from + 1) * zoom
+g_width = ((@gantt.date_to - @gantt.date_from + 1) * zoom).to_i
@gantt.render(:top => headers_height + 8, :zoom => zoom, :g_width => g_width, :subject_width => subject_width)
@@ -89,7 +89,7 @@ month_f = @gantt.date_from
left = 0
height = (show_weeks ? header_heigth : header_heigth + g_height)
@gantt.months.times do
- width = ((month_f >> 1) - month_f) * zoom - 1
+ width = (((month_f >> 1) - month_f) * zoom - 1).to_i
%>
<%= link_to h("#{month_f.year}-#{month_f.month}"), @gantt.params.merge(:year => month_f.year, :month => month_f.month), :title => "#{month_name(month_f.month)} #{month_f.year}"%>
@@ -107,10 +107,10 @@ if show_weeks
left = 0
height = (show_days ? header_heigth - 1 : header_heigth - 1 + g_height)
if @gantt.date_from.cwday == 1
- # @date_from is monday
- week_f = @gantt.date_from
+ # @date_from is monday
+ week_f = @gantt.date_from
else
- # find next monday after @date_from
+ # find next monday after @date_from
week_f = @gantt.date_from + (7 - @gantt.date_from.cwday + 1)
width = (7 - @gantt.date_from.cwday + 1) * zoom - 1
%>
@@ -120,7 +120,7 @@ if show_weeks
end %>
<%
while week_f <= @gantt.date_to
- width = (week_f + 6 <= @gantt.date_to) ? 7 * zoom - 1 : (@gantt.date_to - week_f + 1) * zoom - 1
+ width = ((week_f + 6 <= @gantt.date_to) ? 7 * zoom - 1 : (@gantt.date_to - week_f + 1) * zoom - 1).to_i
%>
<%= week_f.cweek if width >= 16 %>
@@ -159,7 +159,7 @@ end %>
# Today red line (excluded from cache)
#
if Date.today >= @gantt.date_from and Date.today <= @gantt.date_to %>
-
+
<% end %>