Skip to content

Overlap when output branch greater than input branch #146

@jesnault

Description

@jesnault

Currently in the case the position of the y value in the processTo only take into account the input branch value, which create overlap when the branch output value is higher.

In the following example the branch d and f are overlap

Actual Expected
actual expected

Configuration:

data: [
  {from: 'a', to: 'b', flow: 8},
  {from: 'b', to: 'c', flow: 9},
  {from: 'b', to: 'd', flow: 1},
  {from: 'a', to: 'e', flow: 7},
  {from: 'e', to: 'f', flow: 10},
  {from: 'e', to: 'g', flow: 5},
],

In the actual screenshot the e node y coordinate is 8 because only the input branch (a->b) of upper node b is take into account to calculate the position of e.
In the expected screenshot the e node y coordinate is 10 because both input and output branches of upper nodenb are take into account

Proposal:

const size = Math.max(n.in, n.out);
 y = Math.max(n.y + size, y);

PR: #148

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions