lib/reports/GanttChart.rb in taskjuggler-0.0.4 vs lib/reports/GanttChart.rb in taskjuggler-0.0.5

- old
+ new

@@ -161,13 +161,13 @@ "width:#{hasScrollbar? ? @viewWidth : @width}px; " + "height:#{@height + (hasScrollbar? ? SCROLLBARHEIGHT : 0)}px;")) scrollDiv << (div = XMLElement.new('div', 'style' => "margin:0px; padding:0px; " + - "position:absolute; " + + "position:absolute; overflow:hidden; " + "top:0px; left:0px; " + - "width:#{@width.to_i}px; " + + "width:#{@width}px; " + "height:#{@height}px; " + "font-size:10px;")) # Add the header. div << @header.to_html # These are the lines of the chart. @@ -189,13 +189,11 @@ yy = y end end # And the corresponsing arrow heads. @arrowHeads.each do |x, y| - 6.times do |i| - div << lineToHTML(x - i, y - i, x - i, y + i, 'depline') - end + div << arrowHeadToHTML(x, y) end td end @@ -219,11 +217,11 @@ @lines << line end # Returns true if the chart includes a scrollbar. def hasScrollbar? - @viewWidth && @viewWidth < @width + @viewWidth && (@viewWidth < @width) end private # Find the scale with the name _name_ and return a reference to the scale. @@ -260,10 +258,10 @@ # task. def generateDepArrows(task, lines) # Since we need the line and the index we use an index iterator. lines.length.times do |lineIndex| line = lines[lineIndex] - scenarioIdx = line.scenarioIdx + scenarioIdx = line.query.scenarioIdx # Generate the dependencies on the start of the task. collectAndSortArrows('startsuccs', task, scenarioIdx, lineIndex, *line.getTask.startDepLineStart)