diff options
author | Adam Spiers <git@adamspiers.org> | 2015-01-18 20:37:01 +0000 |
---|---|---|
committer | Adam Spiers <git@adamspiers.org> | 2015-01-18 20:37:01 +0000 |
commit | 09b9baddb32879f4d782f78794bd86294e9730a0 (patch) | |
tree | bedde2d4146b4f33f767fbbbeb6984d1a00c0ab4 /html | |
parent | e32901f568b8a5d188b7879de34fd2d3478875cd (diff) | |
download | git-deps-09b9baddb32879f4d782f78794bd86294e9730a0.tar.gz |
improve debugging of row_node_ordering_constraints
Diffstat (limited to 'html')
-rw-r--r-- | html/js/git-deps-layout.coffee | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/html/js/git-deps-layout.coffee b/html/js/git-deps-layout.coffee index 0bbead6..43bcfa5 100644 --- a/html/js/git-deps-layout.coffee +++ b/html/js/git-deps-layout.coffee @@ -81,7 +81,9 @@ build_constraints = -> continue if row_nodes.length <= 1 # Multiple constraints per row. + debug "ordering for row y=#{y}" row_node_ordering_constraints(row_nodes) + debug_constraints() # We need separation constraints ensuring that the top-to-bottom # ordering assigned by dagre is preserved. Since all nodes within @@ -142,14 +144,13 @@ row_node_ordering_constraints = (row_nodes) -> while i < row_nodes.length - 1 left = row_nodes[i] right = row_nodes[i+1] + left_i = gdd.node_index[left.sha1] + right_i = gdd.node_index[right.sha1] + debug " #{left_i} < #{right_i} (#{left.x} < #{right.x})" mm = min_max_ordered_separation_constraints \ - 'x', MIN_NODE_X_GAP, MAX_NODE_X_GAP, - gdd.node_index[left.sha1], - gdd.node_index[right.sha1] + 'x', MIN_NODE_X_GAP, MAX_NODE_X_GAP, left_i, right_i exports.constraints = constraints = constraints.concat mm - i++ - debug_constraints() return row_ordering_constraints = (row_groups) -> |