Skip to content

Commit cec779c

Browse files
author
epriestley
committedMar 29, 2019
When drawing a very wide graph line diagram, smush it together a bit
Summary: Depends on D20345. Use a narrower layout for very large graphs to save some space. Test Plan: Before: {F6320215} After: {F6320216} This does not affect smaller graphs. Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D20346
1 parent e586ed4 commit cec779c

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed
 

‎resources/celerity/map.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
'differential.pkg.css' => '8d8360fb',
1515
'differential.pkg.js' => '67e02996',
1616
'diffusion.pkg.css' => '42c75c37',
17-
'diffusion.pkg.js' => '91192d85',
17+
'diffusion.pkg.js' => 'a98c0bf7',
1818
'maniphest.pkg.css' => '35995d6d',
1919
'maniphest.pkg.js' => 'c9308721',
2020
'rsrc/audio/basic/alert.mp3' => '17889334',
@@ -384,7 +384,7 @@
384384
'rsrc/js/application/diffusion/DiffusionLocateFileSource.js' => '94243d89',
385385
'rsrc/js/application/diffusion/behavior-audit-preview.js' => 'b7b73831',
386386
'rsrc/js/application/diffusion/behavior-commit-branches.js' => '4b671572',
387-
'rsrc/js/application/diffusion/behavior-commit-graph.js' => '1c88f154',
387+
'rsrc/js/application/diffusion/behavior-commit-graph.js' => 'ef836bf2',
388388
'rsrc/js/application/diffusion/behavior-locate-file.js' => '87428eb2',
389389
'rsrc/js/application/diffusion/behavior-pull-lastmodified.js' => 'c715c123',
390390
'rsrc/js/application/doorkeeper/behavior-doorkeeper-tag.js' => '6a85bc5a',
@@ -606,7 +606,7 @@
606606
'javelin-behavior-differential-diff-radios' => '925fe8cd',
607607
'javelin-behavior-differential-populate' => 'dfa1d313',
608608
'javelin-behavior-diffusion-commit-branches' => '4b671572',
609-
'javelin-behavior-diffusion-commit-graph' => '1c88f154',
609+
'javelin-behavior-diffusion-commit-graph' => 'ef836bf2',
610610
'javelin-behavior-diffusion-locate-file' => '87428eb2',
611611
'javelin-behavior-diffusion-pull-lastmodified' => 'c715c123',
612612
'javelin-behavior-document-engine' => '243d6c22',
@@ -1033,11 +1033,6 @@
10331033
'javelin-install',
10341034
'javelin-util',
10351035
),
1036-
'1c88f154' => array(
1037-
'javelin-behavior',
1038-
'javelin-dom',
1039-
'javelin-stratcom',
1040-
),
10411036
'1cab0e9a' => array(
10421037
'javelin-behavior',
10431038
'javelin-dom',
@@ -2124,6 +2119,11 @@
21242119
'phabricator-keyboard-shortcut',
21252120
'javelin-stratcom',
21262121
),
2122+
'ef836bf2' => array(
2123+
'javelin-behavior',
2124+
'javelin-dom',
2125+
'javelin-stratcom',
2126+
),
21272127
'f166c949' => array(
21282128
'javelin-behavior',
21292129
'javelin-behavior-device',

‎webroot/rsrc/js/application/diffusion/behavior-commit-graph.js

+9-1
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,19 @@ JX.behavior('diffusion-commit-graph', function(config) {
4444
cxt.stroke();
4545
}
4646

47+
// If the graph is going to be wide, squish it a bit so it doesn't take up
48+
// quite as much space.
49+
var default_width;
50+
if (config.count >= 8) {
51+
default_width = 6;
52+
} else {
53+
default_width = 12;
54+
}
4755

4856
for (var ii = 0; ii < nodes.length; ii++) {
4957
var data = JX.Stratcom.getData(nodes[ii]);
5058

51-
var cell = 12; // Width of each thread.
59+
var cell = default_width;
5260
var xpos = function(col) {
5361
return (col * cell) + (cell / 2);
5462
};

0 commit comments

Comments
 (0)
Failed to load comments.