33896.patch

Takenori TAKAKI, 2020-09-04 05:59

Download (2.14 KB)

View differences:

app/helpers/application_helper.rb
1644 1644
  # Returns the javascript tags that are included in the html layout head
1645 1645
  def javascript_heads
1646 1646
    tags = javascript_include_tag(
1647
      #'jquery-2.2.4-ui-1.11.0-ujs-5.2.3',
1647 1648
      'jquery-3.5.1-ui-1.12.1-ujs-5.2.3',
1648 1649
      'tribute-5.1.3.min',
1649 1650
      'tablesort-5.2.1.min.js',
public/javascripts/revision_graph.js
18 18
        revisionGraph = Raphael(holder);
19 19

  
20 20
    var top = revisionGraph.set();
21
    var base_element = commit_table_rows.closest('.autoscroll');
21 22
    // init dimensions
22 23
    var graph_x_offset = commit_table_rows.first().find('td').first().position().left - $(holder).position().left,
23
        graph_y_offset = $(holder).position().top,
24
        graph_y_offset = $(holder).offset().top - base_element.offset().top,
24 25
        graph_right_side = graph_x_offset + (graph_space + 1) * XSTEP,
25
        graph_bottom = commit_table_rows.last().position().top + commit_table_rows.last().height() - graph_y_offset;
26
        graph_bottom = commit_table_rows.last().offset().top - base_element.offset().top + commit_table_rows.last().height() - graph_y_offset;
26 27

  
27 28

  
28 29
    var yForRow = function (index, commit) {
......
30 31

  
31 32
      switch (row.find("td:first").css("vertical-align")) {
32 33
        case "middle":
33
          return row.position().top + (row.height() / 2) - graph_y_offset;
34
          return row.offset().top - base_element.offset().top + (row.height() / 2) - graph_y_offset;
34 35
        default:
35
          return row.position().top + - graph_y_offset + CIRCLE_INROW_OFFSET;
36
          return row.offset().top - base_element.offset().top + - graph_y_offset + CIRCLE_INROW_OFFSET;
36 37
      }
37 38
    };
38 39