Skip to content

Commit

Permalink
Add an offset for hierarchical to flow
Browse files Browse the repository at this point in the history
  • Loading branch information
zemlyansky committed Jun 12, 2023
1 parent c9c74eb commit d454053
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ const params = {
const X_SCALE = 2
const X_OFFSET = 350
const Y_SCALE = 4.5
const Y_OFFSET = 0
const Y_OFFSET = 100

if (typeof model === 'undefined') {
model = this.models[this.activeModel]
Expand Down Expand Up @@ -1177,8 +1177,8 @@ const params = {
const yUnique = Array.from(new Set(yArray)).sort((a, b) => a - b)
const positionsNew = positions.map(p => {
return {
x: xUnique.indexOf(p.x) * 350,
y: yUnique.indexOf(p.y) * 450
x: X_OFFSET + xUnique.indexOf(p.x) * 350,
y: Y_OFFSET + yUnique.indexOf(p.y) * 450
}
})

Expand Down

0 comments on commit d454053

Please sign in to comment.