Extend reflexive association limit from 2 to 4#30
Merged
Conversation
added 3 commits
May 12, 2026 14:45
Adds lower-right (index 2) and lower-left (index 3) positions, arranged clockwise from the existing upper-left and upper-right. Lower loops mirror the upper geometry vertically, extending downward from the bottom edge of the node. Label transforms, resize handle drag direction, and side assignment logic are all updated accordingly. The import limit and the limit dialog copy are updated to reflect four.
The side check only matched 'right', so 'lower-right' fell into the left-side branch and computed the width in the wrong direction. Both right-side positions extend outerX to the right of the node and need nextPoint.x - startAnchor.x.
- Expose isRight from getReflexiveAssociationLayout so callers do not re-derive it from side string comparisons; use layout.isRight in both ReflexiveAssociation.jsx and useModelState.js - Rename topSegmentCenter to outerEdgeSegmentCenter to match the outerEdgeY naming introduced for lower loops - Extract getEndRoleTransform helper in ReflexiveAssociation.jsx for consistency with the other three label transform functions - Remove getOppositeReflexiveSide, which had no remaining callers after the third-pass logic was replaced with the four-side cycle - Add tests: outerX direction for all four sides, four reflexive edges each assigned a distinct side, import limit accepts 4 and drops a 5th - Fix javaModelizerImport test to filter by REFLEXIVE_EDGE_TYPE instead of the incorrect "reflexive" string (test was passing vacuously)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #29
Summary
Test plan
npm test)