Skip to content

Commit

Permalink
Update view.js (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Jul 1, 2024
1 parent 76e044d commit 72c1d66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ view.View = class {
const layout = {};
layout.nodesep = 20;
layout.ranksep = 20;
const rotate = graph.nodes.every((node) => node.inputs.filter((input) => !input.type || !input.type.endsWith('*') || input.value.every((value) => !value.initializer)).length === 0 && node.outputs.length === 0);
const rotate = graph.nodes.every((node) => node.inputs.filter((input) => (input.type && !input.type.endsWith('*')) || input.value.every((value) => !value.initializer)).length === 0 && node.outputs.length === 0);
const horizontal = rotate ? options.direction === 'vertical' : options.direction !== 'vertical';
if (horizontal) {
layout.rankdir = 'LR';
Expand Down

0 comments on commit 72c1d66

Please sign in to comment.