Skip to content

Commit

Permalink
Adding in improved FlowConstraint docs for the primary-orientation po…
Browse files Browse the repository at this point in the history
…sitioning, see #1463
  • Loading branch information
jonathanolson committed Jul 30, 2024
1 parent 7901dcb commit 65b3ce0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion js/layout/constraints/FlowConstraint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ export default class FlowConstraint extends FlowConfigurable( NodeLayoutConstrai
}

// Position it
// NOTE: hardcoded stretch:true and an ignored origin offset of 0. effectiveCellAlign will not take the 'origin' value.
// FlowConstraint does not have options to control the main-orientation stretch of each cell, so we will fill
// in the value stretch:true when positioning the cell.
// FlowConstraint ALSO cannot take align-origin in the primary direction, so we hardcode a 0 for the origin offset,
// since all of the possible align values passed (cell.effectiveCellAlign) will not be origin-based.
cell.reposition( orientation, cell.size, position, true, 0, cell.effectiveCellAlign );

position += cell.size;
Expand Down

0 comments on commit 65b3ce0

Please sign in to comment.