Changeset - b8734b428786
[Not reviewed]
default
0 3 0
Mads Kiilerich - 10 years ago 2015-08-11 12:39:07
madski@unity3d.com
graphs: set initial canvas size to 0

The canvas will be set to the right size when the page has loaded. Until the
page has been loaded, Chrome has been seen to set the canvas to be so wide that
it would cover other visible links, thus preventing navigating away from the
page before it has been fully loaded.

This will make sure the canvas never takes up more space than intended.
3 files changed with 3 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/changelog/changelog.html
Show inline comments
 
@@ -68,13 +68,13 @@ ${self.repo_context_bar('changelog', c.f
 
                    </div>
 
                </div>
 

	
 
                <div id="changelog" style="clear:both">
 

	
 
                <div id="graph_nodes">
 
                    <canvas id="graph_canvas"></canvas>
 
                    <canvas id="graph_canvas" style="width:0"></canvas>
 
                </div>
 
                <div id="graph_content" style="${'margin: 0px' if c.changelog_for_path else ''}">
 

	
 
                <table id="changesets">
 
                <tbody>
 
                %for cnt,cs in enumerate(c.pagination):
kallithea/templates/compare/compare_cs.html
Show inline comments
 
@@ -8,13 +8,13 @@
 
    <div class="ancestor">${_('Ancestor')}:
 
      ${h.link_to(h.short_id(c.ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=c.ancestor))}
 
    </div>
 
    %endif
 

	
 
    <div id="graph_nodes">
 
        <canvas id="graph_canvas"></canvas>
 
        <canvas id="graph_canvas" style="width:0"></canvas>
 
    </div>
 

	
 
    <div id="graph_content_pr" style="margin-left: 100px;">
 

	
 
    <table class="compare_view_commits noborder">
 
    %for cnt, cs in enumerate(reversed(c.cs_ranges)):
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -170,13 +170,13 @@ ${self.repo_context_bar('showpullrequest
 
            </div>
 
            <div class="input">
 
              <div class="msg-div">${c.update_msg}</div>
 
              %if c.avail_revs:
 
              <div id="updaterevs" style="max-height:200px; overflow-y:auto; overflow-x:hidden; margin-bottom: 10px">
 
                <div style="height:0">
 
                  <canvas id="avail_graph_canvas"></canvas>
 
                  <canvas id="avail_graph_canvas" style="width:0"></canvas>
 
                </div>
 
                <table id="updaterevs-table" class="noborder" style="padding-left:50px">
 
                  %for cnt, cs in enumerate(c.avail_cs):
 
                    <tr id="chg_available_${cnt+1}">
 
                      %if cs.revision == c.cs_ranges[-1].revision:
 
                        <td>
0 comments (0 inline, 0 general)