adamfk / state-designer

0 stars 0 forks source link

adding to composite state resize behaviour #1

Closed adamfk closed 5 years ago

adamfk commented 5 years ago

graph.extendParentsOnAdd = false

why_extendparentsonadd_false

adamfk commented 5 years ago

We actually may want the expanding behavior (or at least something a bit smarter).

When a group is entered,modified,exited and graph.extendParentsOnAdd = false extendparentsonadd_false_exited_issue

When a group is entered,modified,exited and graph.extendParentsOnAdd = true extendparentsonadd_true_exited_issue

adamfk commented 5 years ago

summary:

graph.extendParentsOnAdd = true

bad: moving children around inside a composite state auto resizes the parent. The children cells are not constrained. bad: Probably harder to shrink the parent's border back to the proper size while respecting original white space (we don't just want to tight fit everything).

graph.extendParentsOnAdd = false

good: This could work OK once we add highlighting and trouble reporting for states that appear grouped, but aren't (which is needed for other reasons already). good: It's easier to expand the border to fit all children than to shrink (as noted above).